Opened 7 years ago

Closed 4 years ago

#16149 closed enhancement (patchwelcome)

Generic Script Injection results in Missing dependency build error

Reported by: Rubbinio Owned by: Rawld Gill
Priority: low Milestone: 1.13
Component: BuildSystem Version: 1.8.0
Keywords: Cc:
Blocked By: Blocking:

Description

We have a module that references a script using "Generic Script Injection". It all works fine except when we try to build the project we get a Missing dependency error and the build fails.

Here is the code we use:

define([
        "dojo/_base/declare",
        "dojo/_base/lang",
        "./ActionsHistory",
        "dojo/i18n!../nls/bulk",
        //========================//
        "/includes/openlayers/OpenLayers.js"
], function(declare, lang, _ActionsHistory, i18n) {
   return declare("myModule.Config", [...], {
    ....
});

At build time the following error happens and the build fails:

 [java] error(311) Missing dependency. module: myModule/Config; dependency: /includes/openlayers/OpenLayers.js

As far as we understand this should work and the loader works fine but when we run the build it fails.

Change History (6)

comment:1 Changed 7 years ago by Rubbinio

Also tried 1.8.1rc3 and we get the same error

comment:2 Changed 7 years ago by Rawld Gill

Milestone: tbd1.9
Status: newassigned

comment:3 Changed 7 years ago by Rawld Gill

Priority: undecidedlow
Type: defectenhancement

The builder was never intended to handle generic script injection via the AMD interface. That said, I'll look into this idea.

comment:4 Changed 6 years ago by bill

Milestone: 1.92.0

Since we released the beta for 1.9, presumably this enhancement should be bumped to 2.0.

comment:5 Changed 5 years ago by Flowkap

As on your comment: "The builder was never intended to handle generic script injection via the AMD interface. That said, I'll look into this idea" I disagree.

It is clearly documented how to use generic script injection (http://dojotoolkit.org/reference-guide/1.9/loader/amd.html#generic-script-injection), so for me its an intended feature of the AMD loader.

Still the build breaks if doing so which is a defect in my opinion. If intended it should be clearly stated within the documentation.

Anyway, is there any workaround for the build system to proceed without errors?

Last edited 5 years ago by Flowkap (previous) (diff)

comment:6 Changed 4 years ago by dylan

Milestone: 2.01.12
Resolution: patchwelcome
Status: assignedclosed

Given that no one has shown interest in creating a patch in the past 2+ years, I'm closing this as patchwelcome.

Note: See TracTickets for help on using tickets.