Closed Bug 666578 Opened 13 years ago Closed 13 years ago

Inputter fails to read 'text!gcli/ui/inputter.css' on GCLI load

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jwalker, Unassigned)

References

Details

Error message:

error
  undefined Missing module: text!gcli/ui/inputter.css
Blocks: GCLI-ENABLE
While I very much like the solution, and I think we should use it to include the HTML and CSS resources in the standard build (see the top of the makefile for how it is done today) I think the moz people will complain at us for including the CSS in the jsm file.

As far as I'm aware we don't actually need those CSS resources anyway, so perhaps we could literally find a way to simply silence the error message?

Would like to use your system for building the main gcli.js file though.

Makes sense?
Sorry the description wasn't clearer.
(In reply to comment #2)
> While I very much like the solution, and I think we should use it to include
> the HTML and CSS resources in the standard build (see the top of the
> makefile for how it is done today) I think the moz people will complain at
> us for including the CSS in the jsm file.
> 
> As far as I'm aware we don't actually need those CSS resources anyway, so
> perhaps we could literally find a way to simply silence the error message?

Yes, you are correct: the jsm file doesn't need it. In the embedded version, `options.preStyled` is always true: https://github.com/fitzgen/gcli/blob/master/lib/gcli/ui/inputter.js#L67

> Would like to use your system for building the main gcli.js file though.

It seems that dryice's `CommonJsProject#ignoreRequires` could be used. Should I make another pull request to dryice that makes it so that you can do something like:

  copy.createCommonJsProject({
    roots: [ gcliHome + '/lib' ],
    ignore: ['text!gcli/ui/inputter.css']
  });

or should I do the following, which should work now without modifying the dryice api:

  var project = copy.createCommonJsProject([ gcliHome + '/lib' ]);
  project.ignoreRequires.append(''text!gcli/ui/inputter.css'');

?
I think it's probably a mistake that ignoreRequires isn't call _ignoreRequires - or at least I don't recall deciding that it should be public.

The former option superficially sounds simple, but I have a nagging feeling that there could be some interaction with import or something.

I would suggest that if it's simple, we do the former, otherwise we do the latter.
I found that there wasn't anything too tricky about adding the ignores: https://github.com/fitzgen/dryice/commit/45f645245c58d3ee91f02e6a081ad3d88e340ce7

See also the latest commit on the bug-666578-css-not-found branch on my GCLI fork: https://github.com/fitzgen/gcli/commits/bug-666578-css-not-found
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
To verify - check that the error message in thge description does not appear on opening the web console.
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.