On 21/03/2014 15:37, Benjamin Smedberg wrote:
On 3/21/2014 10:34 AM, Marco Bonardo wrote:
Or directly make Cu.import act like defineLazyModuleGetter... Would
that be possible?
I don't think that's a good idea. It's not an uncommon pattern to
try/catch around a module import in case it's not present in a
particular configuration or the expected symbols aren't exported,
especially when writing addons that cross versions.
I see, there's no way to touch Cu.import, though we could introduce
Cu.lazyImport, and Cu.moduleExists and start deprecating Cu.import usage.
It may stay for compatibility reasons, while we convert the codebase.
Relegating it to add-ons (considered we may also reach add-on authors
through amo editors/tools) would avoid increases like the one Nicholas
is pointing out. (I'm just throwing out ideas here)
-m
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform