Ticket #2528660 (closed defect)

Reporter


Logan Bowers
Opened: 02/27/10
Last modified: 04/17/12
Status: closed
Type: defect
Resolution: fixed

Owner


Dav Glass
Target Release: 3.5.0
Priority: P3 (normal)
Summary: YUI loader fails to load requirements defined on YUI.add() call
Description:

I'm working against version: 37e93d9ae4f2a2089e8dd974b6e08cc83add2c96

Instantiating YUI with:


var Y = YUI({
base: '/yui/',
combine: false,
groups: {
deft: {
base: '/javascripts/modules/',
modules: {
deft: {
path: 'deft.js'
}
}
}
}
});

File '/javascripts/modules/deft.js' contains:


YUI.add('deft',function(Y) {

},'@VERSION@', { requires: ["base","event-delegate","node-pluginhost","node",'io'] });

If I do:


Y.use('deft');

None of the requirements listed on the requires line are loaded.

Type: defect Observed in Version: development master
Component: Loader Severity: S3 (normal)
Assigned To: Dav Glass Target Release: 3.5.0
Location: Library Code Priority: P3 (normal)
Tags: Relates To:
Browsers: N/A
URL:
Test Information:

Change History

Adam Moore

YUI Contributor

  • Username: adam
  • GitHub: apm
Posted: 02/28/10
  • location changed to Library Code
  • milestone changed to FUTURE
  • priority changed to P3 (normal)
  • status changed from new to accepted

I'll look at this, but you really should Include the requirements in the loader definition for your deft module. You don't want to have to wait for loader to pull down deft before it knows about the rest of the requirements.

Adam Moore

YUI Contributor

  • Username: adam
  • GitHub: apm
Posted: 04/2/10
  • milestone changed from FUTURE to 3.2.0

Adam Moore

YUI Contributor

  • Username: adam
  • GitHub: apm
Posted: 04/2/10
  • resolution changed to fixed
  • status changed from accepted to checkedin

dependencies declared in YUI.add are merged with the loader metadata
if this exists. [fixes #2528201][fixes #2528660].
View Commit:

Adam Moore

YUI Contributor

  • Username: adam
  • GitHub: apm
Posted: 04/2/10

dependencies declared in YUI.add are merged with the loader metadata
if this exists. [fixes #2528201][fixes #2528660].
View Commit:

Adam Moore

YUI Contributor

  • Username: adam
  • GitHub: apm
Posted: 04/6/10

dependencies declared in YUI.add are merged with the loader metadata
if this exists. [fixes #2528201][fixes #2528660].
View Commit:

George

YUI Developer

  • Username: george
Posted: 09/7/10
  • status changed from checkedin to closed

vegitron

  • Username: vegitron
Posted: 02/3/11
  • milestone changed from 3.2.0
  • resolution changed from fixed
  • status changed from closed to reopened

This still seems to be broken. I've tested against 3.3.0, and git rev 344be5ef8d439ed67340cce47cdf334300aa4e64. If I move my requires list into the use() statement, or if I define the requires list in the yui config object, the requirements load, but they don't when listed in .add()

Nick Husher

YUI Contributor

Posted: 02/18/11

See this gist for the simplest possible use case.

The issue isn't that the requirements tree isn't being updated, it's that once the loader is started down the path of including a dependency, it doesn't check to see if the requirements tree ever gets updated. Redesigning the loader to track dependency changes is--based on my perusal of the relevant source code--a significant undertaking.

George

YUI Developer

  • Username: george
Posted: 04/27/11
  • owner changed from Adam Moore to Dav Glass
  • status changed from reopened to assigned

Dav Glass

Posted: 05/11/11
  • milestone changed to 3.4.0
  • status changed from assigned to accepted

Dav Glass

Posted: 06/17/11
  • estimated changed from 0.5 to 0
  • milestone changed from 3.4.0 to 3.NEXT
  • remaining changed from 0.5 to 0
  • sprint changed from sprint 2

Dav Glass

Posted: 03/7/12
  • milestone changed from 3.NEXT to 3.5.0

Dav Glass

Posted: 03/7/12
  • status changed from accepted to checkedin

Jenny Donnelly

YUI Developer

  • Username: jenny
  • GitHub: jenny
Posted: 04/17/12
  • resolution changed to fixed
  • status changed from checkedin to closed

Closing out bugs checked in to 3.5.0.