Raku / toolchain-bikeshed

(ARCHIVE) Discussion area for the Raku toolchain
Artistic License 2.0
4 stars 7 forks source link

Early loading of external CompUnit::Repository #1

Closed ugexe closed 7 years ago

ugexe commented 8 years ago

Allow an external CompUnit::Repository to be loaded before regular modules such that they are available to attempt loading from an identity matching their short-id. Something like:

perl6 -CCompUnit::Repository::GitHub -e 'require <github#http://github.com/user/repo.git>; ...'

or the example in the old s22:

CompUnitRepo::GitHub#masak/html-template

Can this be accomplished with CompUnit::Loader if the proper initialization bits are placed in ModuleLoader.nqp? Or will such an external CompUnit::Repository require its own CompUnit::Loader as well?

niner commented 8 years ago

CompUnit::Loader could do this just fine. What would be nice was a way to load the CompUnit::Repository implementation while still retaining the precompilation ability. Right now once you change the $*REPO chain after a module has been loaded already, we have to disable precomp completely.