Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-core-dev] Dynamic import questions


platform-core-dev-admin@xxxxxxxxxxx wrote on 03/09/2005 10:49:57 AM:

>
> A few questions that came through my mind about our dynamic import
> implementation:
> - Do we support split package (I guess the answer is no and should
> be no anyway)


Nope, just like Import-Package does not support split packages.

> - Do we do any optimization to remember not found packages


We do not remember not found packages.  The reason is new packages
could have been installed.  We could remember and then flush the not
found packages if new bundles are resolved.  We have not done too
much optimization here because in general we do not recommend using
dynamic imports.

> - Do we build a cache to remember which packages have been found and
> who provided them


Yes we cache found package sources just like normal packages that
come from Import-Package or Require-Bundle.

> - If we have caches when do we flush them?


This cache is flushed when the bundle is refreshed or the platform
is restarted.

I caution against using Dynamic-ImportPackage unless there is absolutely
no other way of doing things.  In any case I would never recommend having
Dynamic-ImportPackage: *

That will only give you unpredictable results because you will have no
idea of where all of your packages come from.  You should
scope the dynamic imports down to the package without wildcards if
possible.

Tom.

Back to the top