Re: So, what's the point of Cu.import, these days?

2016-09-27 Thread Anne van Kesteren
On Mon, Sep 26, 2016 at 12:33 PM, wrote: > ES6 modules are supported for chrome code, but not yet for content (pending > spec related discussions that are not relevant for chrome). Can someone please publicly log this issue at https://github.com/whatwg/html or wherever would be appropriate? It'

Re: B2G OS Announcements on Tuesday

2016-09-27 Thread Benjamin Francis
A reminder that this meeting is today, Tuesday, at 9am PT. The main announcements to be discussed are outlined here https://groups.google.com/d/msg/mozilla.dev.fxos/FoAwifahNPY/Lppm0VHVBAAJ Ben On 23 September 2016 at 10:10, Benjamin Francis wrote: > Dear B2G OS community, > > Our weekly meeti

Re: So, what's the point of Cu.import, these days?

2016-09-27 Thread David Teller
On 26/09/16 19:50, zbranie...@mozilla.com wrote: > So, it seems to me that we're talking about two aspects of module loading: > > > 1) Singleton vs. per-instance > > Cu.import allows us to share a single object between all the code that > references it. > > ES6 modules are not meant to do th

Re: So, what's the point of Cu.import, these days?

2016-09-27 Thread Gijs Kruitbosch
On 27/09/2016 10:28, David Teller wrote: On 26/09/16 19:50, zbranie...@mozilla.com wrote: So, it seems to me that we're talking about two aspects of module loading: 1) Singleton vs. per-instance Cu.import allows us to share a single object between all the code that references it. ES6 modu

Re: So, what's the point of Cu.import, these days?

2016-09-27 Thread David Teller
I have opened bug 1305669 with one possible strategy for migrating towards RequireJS. Cheers, David On 25/09/16 01:16, Bobby Holley wrote: > If the conversion is tractable and we end up with module ergonomics that > frontend developers are happy with, I'm certainly in favor of this from > the pl

Re: So, what's the point of Cu.import, these days?

2016-09-27 Thread David Teller
On 27/09/16 11:58, Gijs Kruitbosch wrote: > On 27/09/2016 10:28, David Teller wrote: >> How hard would it be to consider all chrome code (of a JSRuntime) as a >> single webpage? That's pretty much a requirement for any module loader >> we would use for our chrome code. > > I don't see how you wo

Re: B2G OS Announcements on Tuesday

2016-09-27 Thread Benjamin Francis
The meeting will be streamed on Air Mozilla in addition to Vidyo https://air.mozilla.org/b2g-os-announcements-2016-09-27/ On 27 September 2016 at 10:05, Benjamin Francis wrote: > A reminder that this meeting is today, Tuesday, at 9am PT. > > The main announcements to be discussed are outlined h

Re: So, what's the point of Cu.import, these days?

2016-09-27 Thread David Bruant
Le mardi 27 septembre 2016 14:49:36 UTC+2, David Teller a écrit : > I have opened bug 1305669 with one possible strategy for migrating > towards RequireJS. RequireJS [1] is a peculiar choice for chrome code especially if your goal is static analysis. From this thread and what I read in bug, it d

Re: So, what's the point of Cu.import, these days?

2016-09-27 Thread David Teller
You are right, I wrote RequireJS but I was thinking CommonJS, much as is used currently in DevTools and Jetpack. According to their documentation, Facebook's Flow analysis already supports CommonJS modules [1]. Of course, they prefer ES6 modules. It just remains to be seen whether we can migrate t

Re: So, what's the point of Cu.import, these days?

2016-09-27 Thread Zibi Braniecki
On Tuesday, September 27, 2016 at 2:28:54 AM UTC-7, David Teller wrote: > If I understand ES6 modules correctly, two imports from the same webpage > will return the same module instance, right? I don't think this is a correct statement across globals. When you load two modules in one js context,

Re: B2G OS Announcements on Tuesday

2016-09-27 Thread Benjamin Francis
Thank you to everyone who attended this meeting today, the meeting notes are now on the wiki. Ben On 27 September 2016 at 16:02, Benjamin Francis wrote: > The meeting will be streamed on Air Mozilla in addition to Vidyo > > https://air.mozilla.o

Re: So, what's the point of Cu.import, these days?

2016-09-27 Thread David Teller
On 27/09/16 19:35, Zibi Braniecki wrote: > On Tuesday, September 27, 2016 at 2:28:54 AM UTC-7, David Teller wrote: >> If I understand ES6 modules correctly, two imports from the same webpage >> will return the same module instance, right? > > I don't think this is a correct statement across global

Re: So, what's the point of Cu.import, these days?

2016-09-27 Thread David Teller
I have posted a draft of a plan for migrating from JSM to ES6 modules here: https://gist.github.com/Yoric/2a7c8395377c7187ebf02219980b6f4d Cheers, David ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev

Re: So, what's the point of Cu.import, these days?

2016-09-27 Thread Kris Maglione
On Sun, Sep 25, 2016 at 12:13:41AM +0200, David Teller wrote: So, can anybody think of good reason to not do this? One major problem I see with this is that we currently lazily import most modules the first time that a symbol they export is referenced. If we move to CommonJS or ES6 modules, w