Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14020 closed defect (fixed)

1.6 profiles with layerDependencies don't convert properly

Reported by: dfabulich Owned by: Rawld Gill
Priority: high Milestone: 1.7
Component: BuildSystem Version: 1.7.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

TO REPRO:

Pull down http://svn.dojotoolkit.org/src/view/anon/all/trunk at revision 26720 (current head)

Unzip the attached "layerbug" directory in the trunk directory; the layerbug directiory should be a sibling of dojo and util directories.

$ cd util/buildscripts $ ./build.sh action=release profileFile=../../layerbug/profile.js

ACTUAL:

running under node.js warn(218) the command line switch profileFile is deprectated; use profile for both files and profiles error(351) Cannot deduce module identifier from layer dependency layer name: ../layerbug/bar.js; layer dependency name: layerbug.foo errors on command line; terminating application.

EXPECTED:

This layer file built correctly in 1.6.1, so it should continue to work in 1.7.0.

Attachments (2)

layerbug.zip (910 bytes) - added by dfabulich 8 years ago.
sample layer with layerDependencies
layerbug.patch (1.5 KB) - added by dfabulich 8 years ago.
patch: delete transformLayerDependencies. Seems to fix the bug, but that can't be right, can it?

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by dfabulich

Attachment: layerbug.zip added

sample layer with layerDependencies

comment:1 Changed 8 years ago by dfabulich

As a workaround, I'm able to get the layer to build if I replace this line in my layerbug/profile.js

  layerDependencies: ["layerbug.foo"]

with:

  layerDependencies: ["../layerbug/foo.js"]

Investigating the code in v1xProfiles.js, it appears to be incorrectly assuming that layerDependencies consists of a list of layer.name values, when it's actually a list of module names, according to http://docs.dojocampus.org/build/index#profiles

I've attached a simple-minded patch to delete transformLayerDependencies and just use transformDependencies instead. This fixes the bug in my case, but I'm sure it breaks something else...? (I've signed the Dojo CLA.)

Changed 8 years ago by dfabulich

Attachment: layerbug.patch added

patch: delete transformLayerDependencies. Seems to fix the bug, but that can't be right, can it?

comment:2 Changed 8 years ago by Rawld Gill

Resolution: fixed
Status: newclosed

In [26743]:

loosened restrictions on the way layerDependencies are specified; fixes #14020

Last edited 8 years ago by Rawld Gill (previous) (diff)

comment:3 Changed 8 years ago by Rawld Gill

Great report and repro case; thanks dfabulich!

v1.6 docs are inconsistent in defining the acceptable format of contents of layerDependencies...some say module ids, others say paths. Solved the problem by accepting both.

comment:4 Changed 8 years ago by Rawld Gill

In [26744]:

fixed dojo/dojo layer being written twice/as a separate boot layer; further enhanced backcompat jankies for layerDependencies; \!strict; refs #14020; fixes #14010

comment:13 Changed 8 years ago by bill

Milestone: tbd1.7
Note: See TracTickets for help on using tickets.