Opened 8 years ago

Closed 7 years ago

#12113 closed defect (wontfix)

Base class undefined in build with circular references

Reported by: robert.dojo Owned by: Rawld Gill
Priority: low Milestone: 1.8
Component: BuildSystem Version: 1.5
Keywords: Cc:
Blocked By: Blocking:

Description

There is a problem in using a build (merged) javascript file, when it contains circular references. The superclass declaration can end up after the subclass.

I can reproduce this using three classes:

* test.MyClassA requires test.MyOtherClass? test.MyOtherClass? requires test.MyClassB test.MyClassB extends and requires test.MyClassA *

A package.js is used to require all classes and is used by the build profile. * dojo.require("test.MyClassA"); dojo.require("test.MyClassB"); dojo.require("test.MyOtherClass?"); *

The build javascript file then contains test.MyClassA as the last entry. This example can be easily fixed by requiring test.MyOtherClass? first, however with many more classes this is extremely difficult.

What I would like to see is that the build system also looks at dojo.declare to determine the best order for putting classes in the build output. Because the order of the classes usually only matters for subclasses.

I attached the whole example to this ticket.

Attachments (1)

DojoBuildTest.zip (115.6 KB) - added by robert.dojo 8 years ago.
Example test project with circular references

Download all attachments as: .zip

Change History (5)

Changed 8 years ago by robert.dojo

Attachment: DojoBuildTest.zip added

Example test project with circular references

comment:1 Changed 7 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:2 Changed 7 years ago by Rawld Gill

Status: newassigned

comment:3 Changed 7 years ago by Rawld Gill

Milestone: tbd1.8
Priority: highlow

This should be fixed. Leaving open to test.

comment:4 Changed 7 years ago by Rawld Gill

Resolution: wontfix
Status: assignedclosed

This is not a problem with the 1.7+ builder. The load order and code path is the same for built versions as for dev versions.

There are no plans to do anything new with the old builder.

Note: See TracTickets for help on using tickets.