Skip to content

Easy way to load all needed packages after activating enviroment? #94

@oxinabox

Description

@oxinabox

The enviroment stored in the JLSO means we always have access to the right packages.
Bu they need to be usinged (or at least Base.requireed) to have the JLSO correctly deserialize any types from them.
Else you get a UInt8 array.

Ideally we would workout which are actually used in the JLSO for a particular object and be able to using them.

A work around is to load everything.
It is a bit gross but the following works (I think it needs julia 1.4)

using Pkg: Pkg
eval(Expr(:using, (Expr(:., n) for n in Symbol.(keys(Pkg.Types.Context().env.project.deps)))...))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions