Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds back the possibility of customizing the behavior of
@frompackage
/@fromparent
using settings/optionsThe supported options are now defined inside the
FromPackageOptions
type and are:rootmodule::Bool
: Specifies whether the target module shall be registered as root module at the beginning of the loading procedure. This is relying on Base internals but can be useful in some cases, for example when the package internals rely onBase.pkgdir
or similar which depend on the module being registered as root module.manifest::Symbol
: This controls whether the macro will try toinstantiate
orresolve
the target environment before loading the package. The supported options are::instantiate
: which will callPkg.instantiate
on the target environment:resolve
: which will callPkg.resolve
on the target environmentverbose::Bool
: This option will just send some logs for debugging while loading the contents of the package.These options must be passed to the end of the
@fromparent
or@frompackage
macro call as a seris ofoption = value
as in the following image from the test/TestInception/inception_notebook.jl notebook: