On 9/25/09 16:29, Guillaume Nodet wrote:
Then, the next question is: is there any drawback in using dynamic
imports instead of optional imports ?
If this avoid the need for refreshing whithout too much overhead, that
would be fine.
I guess it would consume a bit more cpu when each time a class is
trying to be loaded while the package is not wired. Anything else in
mind ?
I think that is the main consideration, it will take a little longer
when you ask for the class and it is not there, but you are likely
catching a CNFE anyway, so it is probably not super quick to begin with.
Once you can a dynamic wire, then it is the same as any normal wire.
-> richard
On Fri, Sep 25, 2009 at 16:22, Richard S. Hall<[email protected]> wrote:
On 9/25/09 15:54, Guillaume Nodet wrote:
So what about if you import something optionally and add a dynamic
import at the same time ?
Is that allowed ?
The goal would be to wire early if possible, but wire lately
(dynamically) if not ...
That would avoid refreshing the bundle if a bundle solving an optional
import is later installed.
Isn't that what you can use dynamic imports for in the first place? I am not
sure you add any expressive capability by being able to optionally import
and dynamically import the same package at the same time.
To answer your question, though, I am not exactly sure how we handle this
corner case. If we look at the wires, then it would be allowed. If we look
at the metadata, then it would not.
-> richard
On Fri, Sep 25, 2009 at 15:50, Richard S. Hall<[email protected]>
wrote:
On 9/25/09 11:44, Marcel Offermans wrote:
On Sep 25, 2009, at 11:35 , Richard S. Hall wrote:
For Q2, bundles will not be allowed to dynamically import packages they
export.
Does this actually mean that the framework will refuse to install or
resolve such bundles?
No, it means the framework will not allow it to create a dynamic wire for
those packages. If it exports it, that's all it will ever do. You can
only
dynamically import something you do not import, export, or require
already.
But it is not an install error to do so, just an unreachable condition.
-> richard
Greetings, Marcel
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]