Opened 11 years ago

Closed 8 years ago

#7610 closed defect (wontfix)

dojo.require calls from a layerDependency should stay in the dependent layer

Reported by: James Burke Owned by: Rawld Gill
Priority: low Milestone: future
Component: BuildSystem Version: 1.2beta
Keywords: needsreview Cc: dante
Blocked By: Blocking:

Description

Right now, dojo.require() calls for modules in a layerDependency are stripped out of a dependent layer, since they are assumed to be part of the modules satisfied by the build.

Probably need to treat layerDependency modules in a separate list than the list used to do the dojo.require stripping. Need to make sure if it is safe to treat this as the default, or if we need to provide an option for it. Initial thought, it should be fine as the default.

Change History (8)

comment:1 Changed 11 years ago by James Burke

This is related to bug #5189, I believe they are the same issue.

Looking more at it, I think the provide calls for a layer should be stored as an object under namedLayerUris, along with the layerUris, inside buildUtil.getDependencyList. Then use that info to trim the currentProvideList.

Still need to make sure this does not mess up layers as-is. Also maybe just do the trimming if the layer is a discard.

comment:2 Changed 11 years ago by dante

Cc: dante added

istm that if a layer is defined as a discard layer, then later as a layerDependency the trimming should occur, and an appropriate dojo.require() call should be injected back into the layer created (with the layerDependency) to match the discarded layer.

comment:3 Changed 11 years ago by dante

on second thought, when using discard:true the layer isn't created at all (?), so the seemingly desired result would be to build the discarded layer, and then if a layerDependency item matches the discarded layer add the dojo.require(). perhaps a new option (other than discard:) would be easiest? or just pull any layerDependencies listed from the strip list of the current layer, adding back dojo.require()'s for matches there.

comment:4 Changed 11 years ago by James Burke

What about having an object like:

dependencies.layer.keepRequires = {

"mymodule.one", "mymodule.two"

}

so that the requires you want to keep in can be explicitly identified? This might make the fix a lot simpler to do.

comment:5 Changed 11 years ago by James Burke

(In [15429]) Refs #7610. Introduces layer.keepRequires. Still need to confirm with Peter if it fixes the ticket.

comment:6 Changed 8 years ago by ben hockey

Keywords: needsreview added
Priority: highlow

comment:7 Changed 8 years ago by bill

Owner: changed from James Burke to Rawld Gill

Bulk update to assign BuildSystem? tickets to Rawld. Many of these are probably already fixed in 1.7.

comment:8 Changed 8 years ago by Rawld Gill

Resolution: wontfix
Status: newclosed

Ancient ticket about functionality that no longer exists; therefore, closing.

Note: See TracTickets for help on using tickets.