Opened 11 years ago

Closed 11 years ago

#13062 closed defect (fixed)

Problem with build tool 'dependencyLayers' system

Reported by: tissandier Owned by: Rawld Gill
Priority: high Milestone: 1.7
Component: BuildSystem Version: 1.6.1
Keywords: Cc:
Blocked By: Blocking:


Here is a simple test sample that shows the main problem that we have with the current Dojo build tool.

The problem is that the "dependencyLayers" property in the build profile does not seem to be correctly taken into account, especially when dojox classes are used.

The sample contains a very simple module ("testModule") that contains one Dojo class ("testModule.ArrayListEnumerator?"). This class uses the dojox.collection.ArrayList? class. The build tool profile test.profile.js defines two layers: The first layer (dojox_discard.js) is a "discard" layer and has a dependency on dojox.collections.ArrayList?. The second layer (testModule_layer.js) has a dependency on the testModule.ArrayListEnumerator? class, and references the first layer in its "layerDependencies".

The goal is to build a layer (the second one) that contains the testModule code, but that does not contain any dojox code. This is the mechanism that is documented here:

"layerDependencies Specifies other layers which are prerequisites for this layer; resources in the prerequisite layers are not duplicated in the current layer being built. That is, if the builder locates a dojo.require statement in a source file, but that resource has already been placed in one of the layers specified as one of the layer dependencies, that resource will not be included in the current layer."

It seems that this mechanism does not work as expected in the current Dojo trunk: the code for dojox.collections.ArrayList? is duplicated in the testModule layer, even though it is defined as a dependency layer. In addition, the "discard" flag seems ignored (the dojox_discard.js file is kept, whereas it should be discarded).

To reproduce the problem: Extract the attached zip in the same directory as dojo/dojox/dijit/util Go to util/buildscripts and run the build tool using the profile contained in testModule:

build.bat profileFile=../../testModule/test.profile.js action=release

Using, Dojo 1.7, the resulting layer (release/dojo/testModule/testModule_layer.js) contains the dojox.collections.ArrayList? code (in addition to the testModule code), which is not what we want.

The same thing using Dojo 1.5 produces a correct layer, containing only the testModule.ArrayListEnumerator? code and no dojox code.

Is this mechanism still supported? Or should it be done another way in Dojo 1.7?

Attachments (1) (1.7 KB) - added by tissandier 11 years ago.

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by tissandier

Attachment: added

comment:1 Changed 11 years ago by Douglas Hays

Owner: set to Rawld Gill

comment:2 Changed 11 years ago by Rawld Gill

Resolution: fixed
Status: newclosed

(In [25175]) added feature (available in v1.x profiles) to exclude layers from layers (was only allowing excluding modules); fixes #13062; !strict

comment:3 Changed 10 years ago by bill

Component: GeneralBuildSystem

Looks like these are builder bugs.

Note: See TracTickets for help on using tickets.