Closed Bug 767017 Opened 12 years ago Closed 10 years ago

Ensure that the builder will still work with cfx.js

Categories

(addons.mozilla.org Graveyard :: Add-on Builder, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: ochameau, Unassigned)

References

Details

Bug 746131 is now in good shape. We should be able to land first pieces of cfx implemented in javascript soon.
In this patch, there should not be any difference, no feature drop, no deprecation, ... I've done my best to reimplement exactly the same features than the ones implemented in python.
But still, there is something that can bite you. Now, "cfx xpi" command will require to have a xulrunner/firefox binary around. It basically means that you will have to install one of those binary on servers which are used to build addons.
And having it installed is not necessary enough. You will need an X server in order to be able to run cfx (as cfx runs firefox). (firefox still can't be executed offscreen)

If you do not have X running on these servers, I'd highly suggest you to use Xvfb, a virtual X server.

So at the end you will need to execute cfx with something like this:

  $ Xvfb :1&
  $ export DISPLAY=:1
  $ cfx xpi -b /path/to/firefox/or/xulrunner/binary


Feel free to ping me if you have some question and I'd be happy to have a meeting if you have some concerns about this change.
What alternatives can we do to avoid having Firefox and X be requirements?
(In reply to Wil Clouser [:clouserw] from comment #1)
> What alternatives can we do to avoid having Firefox and X be requirements?

A Node.js implementation.
(In reply to Jeff Griffiths from comment #2)
> (In reply to Wil Clouser [:clouserw] from comment #1)
> > What alternatives can we do to avoid having Firefox and X be requirements?
> 
> A Node.js implementation.

I thought that's what we were aiming for originally, but yeah, I guess my question was too short:  Is this cfx.js a step towards the node.js implementation or is it divergent?
Wil, what are the significant concerns with the Firefox-on-server route? Jetpackers, how feasible is a Node.js version? Far-future?
(In reply to Wil Clouser [:clouserw] from comment #3)

> I thought that's what we were aiming for originally, but yeah, I guess my
> question was too short:  Is this cfx.js a step towards the node.js
> implementation or is it divergent?

Currently cfx.js is a gecko implementation, hence the Firefox dependency.

Alex: can you comment on how 'portable' the code is currently, wrt running it via node.js on the server?
FWIW, it's really important to get cfx working in the browser - if we can package in the browser I wonder if we still need to package on the server.
(In reply to daniel from comment #4)
> Wil, what are the significant concerns with the Firefox-on-server route?

CCing oremj from IT
Last time I checked, I haven't found any zip module for node that would allow to *create* a zip file. There may be one available today?
If we manage to find one, it would be feasable but will require additional development time. Then in next cfx.js steps, like manifest building, it may require some more development in order to ensure using a FS api that would work on both platforms. Writing such FS API is a whole project by itself.

Having a node compatibility is something we should try, but I would really prefer to do it next, when we have the full implementation in JS.

Finally, we should keep it mind that building the xpi on server side is far from being ideal. It would be easier for us, the sdk team, to improve the addon builder helper addon in order to build addons locally! (It is one big reason to work on cfx in JS) But obviously it would require more work for the builder team. At the end, if we do this, having a node version would not be usefull. (Note that for any other command other than "cfx xpi", firefox binary is already needed!)
(In reply to Jeff Griffiths from comment #6)
> FWIW, it's really important to get cfx working in the browser - if we can
> package in the browser I wonder if we still need to package on the server.

+1 you just summarized my whole thought. Yes it will be super easy to do so when Irakli will land his part (the packageless/manifest implementation in JS).
(In reply to Alexandre Poirot (:ochameau) from comment #9)
> (In reply to Jeff Griffiths from comment #6)
> > FWIW, it's really important to get cfx working in the browser - if we can
> > package in the browser I wonder if we still need to package on the server.
> 
> +1 you just summarized my whole thought. Yes it will be super easy to do so
> when Irakli will land his part (the packageless/manifest implementation in
> JS).

Yes, this is a great idea. :)
In fact I started with nodejs implementation as bootstrap part was missing back then. So I'll be working on adapter to make it compatible with browser js :) Also it require just a very little IO so it should be pretty straight forward.
Code can be found here https://github.com/Gozala/cfx-js
Note: Documentation is very old and out of date.
What is the status of that? Builder is able to provide Zipped source if needed
I'm working on Gaia these days so I'm not in sync with the current status of cfx in JS.

My work that was about to land and depends on xulrunner has been kept in the following branch:
https://github.com/mozilla/addon-sdk/tree/cfx-js

We might be able to reopen this bug later, if needed ?
The status is that python cfx continues to work well for builder, so until we land cfx-js and implement in-browser packaging in add-on builder helper, we'll just stick with Python. It feels like we need Alex back from the Gaia team to really knock that out of the park, but the work is on the roadmap for the first half of 2013.

The Builder work that is more critical is to adjust builder so that it works with a Firefox version that bundles the SDK apis, ie bug 793925, which in turn requires bug 809581.
The builder project has been discontinued as of April 1st, 2014.

The announcement last year: https://blog.mozilla.org/addons/2013/12/18/add-on-builder/

Next steps (still being written): https://developer.mozilla.org/en-US/Add-ons/SDK/Builder
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.