Opened 10 years ago

Last modified 10 years ago

#14972 closed defect

[regression] Concatenated built layers load dependencies too aggressively in legacy mode ā€” at Version 1

Reported by: Colin Snover Owned by: Rawld Gill
Priority: undecided Milestone: 1.7.3
Component: Loader Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Colin Snover)

Iā€™m trying to create a concatenation of built layers that uses flattened NLS bundles. Unfortunately, it seems that there are at least two places in the loader where dependencies are preemptively requested in response to define calls, which means that, though the chain of dependencies, these files are required *in addition to* their constituent files. The locations in the 1.7 branch corresponding to this problem appear to be:

  1. dojo.js:1466 @if(has("dojo-sync-loader") && legacyMode && !waiting[mid]){@
  2. dojo.js:1667 @if(targetModule && !waiting[targetModule.mid]){@

Steps to reproduce:

  1. Create standard build (w/ noref flag).
  2. Create a PHP script like this within the release @[email protected] directory for the build:
<?php

header('Content-Type: text/javascript');
readfile('dojo.js.uncompressed.js');
readfile('../dijit/dijit.js.uncompressed.js');
readfile('../dijit/dijit-all.js.uncompressed.js');
readfile('../dojox/grid/DataGrid.js.uncompressed.js');
  1. Create a valid, blank page containing only this script:
<script data-dojo-config="locale: 'en-us', baseUrl: '//cross-domain/path/to/dojo'" src="//cross-domain/path/to/dojo/concat.php?/dojo.js"></script>

Expected: concat.php and dijit-all_en-us.js load. Actual: those scripts plus 8 additional scripts load.

Change History (1)

comment:1 Changed 10 years ago by Colin Snover

Description: modified (diff)
Note: See TracTickets for help on using tickets.