#14819 closed defect (fixed)
Legacy build + 1.7.1 forces including deprecated files into build
Reported by: | Karl Tiedt | Owned by: | bill |
---|---|---|---|
Priority: | undecided | Milestone: | 1.8 |
Component: | Dijit | Version: | 1.7.2rc1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
NOTE: this probably isnt really "BuildSystem" but it didnt really fit anywhere else either -- feel free to reassign more appropriately.
I discussed this with Bill last week, but figure I will open a ticket for posterity sake and see where the conversation goes.
Files likes AccordionContainer.js have code such as:
// Back compat w/1.6, remove for 2.0 if(!kernel.isAsync){ ready(0, function(){ var requires = ["dijit/layout/AccordionPane"]; require(requires); // use indirection so modules not rolled into a build }); }
Because of this... if your production product is on limited hardware where you cannot ship a modular build (only include layers and necessary files) -- you are forced to roll AccordionPane.js into your build as well now.
This is far from an ideal situation... Note there are other files as well but I believe this is the only instance of a deprecated file being forced to load... Surely there is a better solution.
Change History (9)
comment:1 follow-up: 2 Changed 9 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 9 years ago by
Replying to bill:
Another possibility is to add a has flag somewhere:
has.add("dijit-legacy-requires", !kernel.isAsync);and then reference that in other modules, example from above:
// Back compat w/1.6, remove for 2.0 if(has("dijit-legacy-requires")){ //etc. }That would allow you to strip all this code from your non-AMD build using staticHasFeatures in your build profile. What do you think?
I think this is the best approach. Do you want to take the ticket?
comment:3 Changed 9 years ago by
Component: | BuildSystem → Dijit |
---|---|
Milestone: | tbd → 1.8 |
Owner: | changed from Rawld Gill to bill |
Status: | new → assigned |
Sure.
comment:4 Changed 9 years ago by
Note that besides dijit this technique is used for dojo/dnd, although the files loaded there are very small.
comment:5 Changed 9 years ago by
Yes but only dijit loads deprecated files, I think most of dnd are files that would get used with dnd applications
Here are links to the first mailing list discussion and the second mailing list discussion.
I'm happy to remove that code altogether, but some would see it as a break in backwards-compatibility since in 1.0
dojo.require(dijit/layout/AccordionContainer);
defined AccordionPane.Another possibility is to add a has flag somewhere:
and then reference that in other modules, example from above:
That would allow you to strip all this code from your non-AMD build using staticHasFeatures in your build profile. What do you think?