Opened 10 years ago

Closed 9 years ago

#10121 closed defect (invalid)

Missing semicolon causes problems when file is built

Reported by: johnksawers Owned by: James Burke
Priority: high Milestone: tbd
Component: General Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:


I'm new to dojo, so I don't know where everything lives yet. But I have a custom built version of the library (using the dojo build system) which includes this block:


invalidMessage: "The value entered is not valid.", missingMessage: "This value is required.", rangeMessage: "This value is out of range."


There is not semicolon at the end of that block, and so when it's built into the dojo-mybuild.js file, it causes a JS error in the browser (firefox 3.5.3). This happens in both the compressed and uncompressed versions. If you need more information, I can try to track it down, but I hope that's enough.

Change History (6)

comment:1 Changed 10 years ago by James Burke

Can you give some more context to the issue? Is the build system explicitly stripping out a semicolon you had in place? The code above looks vaguely like an i18n bundle that might be loaded via dojo.requireLocalization -- are you inlining built i18n bundles?

Some more context about what comes before and after that block might be useful.

comment:2 Changed 9 years ago by James Burke

Resolution: invalid
Status: newclosed

Closing for now because there is not enough information, but feel free to reopen with more information (see previous comment).

comment:3 Changed 9 years ago by johnksawers

Resolution: invalid
Status: closedreopened

I didn't understand where the problem came from in my original post, now that I've had more time with it, I can give more insight. The problem still exists in 1.4.2. As far as I can tell, the problem is due to some of the string interning in the build process. My build config is below, you should be able to run that and load it in a browser to see the error. I have not modified any of the source files before running this build.

I will monitor this bug for questions from you. I wish it would email me automatically.

There is another bug in there too. One of the comments mentions the <?xml tag, and the browser tries to parse that as HTML, throwing another error.

dependencies = {

layers: [


name: "dojo-mybuild.js", customBase: false, dependencies: [

"dojo.parser", "dijit.layout.ContentPane?", "dojox.layout.GridContainer?", "dojo.fx", "", "dojo._base.lang", "dojo._base.declare", "dojo._base.connect", "dojo._base.Deferred", "dojo._base.json", "dojo._base.array", "dojo._base.Color", "dojo._base", "dojo._base.window", "dojo._base.event", "dojo._base.html", "dojo._base.NodeList?", "dojo._base.query", "dojo._base.xhr", "dojo._base.fx", "dojo._base.browser", "dojo.parser", "", "dojo.cookie", "dojo.regexp", "dojox.dtl", "dojox.dtl._base", "dojox.string.Builder", "dojox.string.tokenize", "", "dojox.dtl.Context", "dojox.dtl._Templated", "dijit.layout.TabContainer?", "dijit._Templated", "dijit._Widget", "dijit._base", "dijit._base.focus", "dijit._base.manager", "", "dojo.AdapterRegistry?", "dijit._base.popup", "dijit._base.window", "dijit._base.scroll", "dijit._base.sniff", "dijit._base.typematic", "dijit._base.wai", "dojo.string", "dijit.form.ComboButton?", "dijit.form.Button", "dijit.form._FormWidget", "dijit._Container", "dijit.form.Form", "dijit.form._FormMixin", "dijit.layout.TabContainer?", "dijit.layout.StackContainer?", "dijit.layout._LayoutWidget", "dijit._Contained", "dojo.i18n", "dijit.nls.common", "dijit.nls.common.ROOT", "dijit.layout.StackController?", "dijit.form.ToggleButton?", "dijit.Menu", "dijit._KeyNavContainer", "dijit.MenuItem?", "dijit.PopupMenuItem?", "dijit.CheckedMenuItem?", "dijit.MenuSeparator?", "dijit.layout.TabController?", "", "", "", "", "dijit.form.FilteringSelect?", "dijit.form.ComboBox?", "dijit.form.ValidationTextBox?", "dijit.form.TextBox?", "dijit.Tooltip", "dijit.form.nls.validate", "dijit.form.nls.validate.ROOT", "dijit.form.nls.ComboBox?", "dijit.form.nls.ComboBox?.ROOT", "", "", "dojo.cldr.supplemental", "dojo.cldr.nls.gregorian", "dojo.cldr.nls.gregorian.en", "dojox.dtl.tag.logic", "dojox.dtl.filter.dates", "", "", "dojox.dtl.filter.misc", "dojox.dtl.filter.lists", "dojox.dtl.tag.misc", "dojox.dtl.filter.logic"




prefixes: [

[ "dijit", "../dijit" ], [ "dojox", "../dojox" ]



comment:4 Changed 9 years ago by bill

Owner: changed from anonymous to James Burke
Status: reopenednew

comment:5 Changed 9 years ago by James Burke

Ah OK, so it looks like your build profile contains explicit references to specific i18n bundles. Remove those and it should work. Unfortunately at this time inlining the i18n bundles in a build profile are not supported -- they need to by dynamically loaded at runtime based on the browser or runtime locale setting.

Also, you can remove a few of those dojo._base references since customBase: false. I would just remove the customBase: false option, and then if you rename the build layer to name: "dojo.js", it will build in the Dojo Base automatically, no need to list any dojo._base modules.

Also, instead of referencing all the dijit._base names, if you just use dijit.dijit that should pick them up.

Those changes along with removing any of the names with "nls" in them should get the build to work.

comment:6 Changed 9 years ago by James Burke

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.