Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#8473 closed defect (fixed)

Build fails when certain modules loaded into layer

Reported by: dante Owned by: dante
Priority: high Milestone: 1.3
Component: General Version: 1.2.3
Keywords: Cc:
Blocked By: Blocking:

Description

Trying to run a build with the profile:

dependencies = {
	layers: [
		{
			name: "../dijit/ui.js",
			resourceName:"dijit.ui",
			dependencies: [
				"dijit.form.Slider"
			]
		}
	],

	prefixes: [
		[ "dijit", "../dijit" ],
	]
};

throws an error:

release:  Building dojo.js and layer files
error loading uri: ./../../release/dojo/dijit/form/Slider.js, exception: TypeError: Cannot call method "split" of undefined

Building with a slightly different profile works (replacing the single 'dijit.slider' ref with the expansion of the rollup contents into modules):

dependencies = {
	layers: [
		{
			name: "../dijit/ui.js",
			resourceName:"dijit.ui",
			dependencies: [
				"dijit.form.HorizontalSlider",
				"dijit.form.VerticalSlider",
				"dijit.form.HorizontalRule",
				"dijit.form.VerticalRule",
				"dijit.form.HorizontalRuleLabels",
				"dijit.form.VerticalRuleLabels"
			]
		}
	],

	prefixes: [
		[ "dijit", "../dijit" ],
	]
};

not sure if this is a build issue, a stubs issue (part of 1:1 mapping is why Slider.js is there)

Change History (4)

comment:1 Changed 10 years ago by dante

Milestone: tbd1.3
Owner: changed from anonymous to dante
Priority: normalhigh

ugh. you know what this is:

dojo.deprecated("Do dojo.require() HorizontalSlider, VerticalRule, etc, rather than of dijit.form.Slider itself", "", "2.0");

the build matches the dojo.require in the deprecated call and tries to load it into the layer, but can't split by '.' on an undefined match.

is "Use require()" unclear in the deprecated call?

also need to peek in other stubs like this generated talking about dojo.require changes.

comment:2 Changed 10 years ago by James Burke

Using "Do dojo.require" without the parentheses should also be safe.

comment:3 Changed 10 years ago by dante

Resolution: fixed
Status: newclosed

this only appeared in the one place. Note: there are a LOT of places that reference dojo.require() inside of comment blocks, but that doesn't seem to affect the build at all.

comment:4 Changed 10 years ago by James Burke

Comments are stripped before looking for dojo.require calls, but not string values.

Note: See TracTickets for help on using tickets.