Last Comment Bug 666578 - Inputter fails to read 'text!gcli/ui/inputter.css' on GCLI load
: Inputter fails to read 'text!gcli/ui/inputter.css' on GCLI load
Status: RESOLVED FIXED
:
Product: Firefox
Classification: Client Software
Component: Developer Tools (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on:
Blocks: GCLI-ENABLE
  Show dependency treegraph
 
Reported: 2011-06-23 07:10 PDT by Joe Walker [:jwalker] (needinfo me or ping on irc)
Modified: 2011-07-01 07:18 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Joe Walker [:jwalker] (needinfo me or ping on irc) 2011-06-23 07:10:21 PDT
Error message:

error
  undefined Missing module: text!gcli/ui/inputter.css
Comment 1 Nick Fitzgerald [:fitzgen] [⏰PDT; UTC-7] 2011-06-24 14:42:31 PDT
See pull request to dryice on github: https://github.com/mozilla/dryice/pull/10/files
Comment 2 Joe Walker [:jwalker] (needinfo me or ping on irc) 2011-06-27 12:08:33 PDT
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.
Comment 3 Nick Fitzgerald [:fitzgen] [⏰PDT; UTC-7] 2011-06-27 12:36:44 PDT
(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'');

?
Comment 4 Joe Walker [:jwalker] (needinfo me or ping on irc) 2011-06-28 01:14:14 PDT
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.
Comment 5 Nick Fitzgerald [:fitzgen] [⏰PDT; UTC-7] 2011-06-28 14:08:02 PDT
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
Comment 6 Joe Walker [:jwalker] (needinfo me or ping on irc) 2011-07-01 07:18:05 PDT
To verify - check that the error message in thge description does not appear on opening the web console.

Note You need to log in before you can comment on or make changes to this bug.