Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function for loading a package with a specific manifest #5

Closed
DilumAluthge opened this issue Nov 26, 2019 · 0 comments
Closed

Function for loading a package with a specific manifest #5

DilumAluthge opened this issue Nov 26, 2019 · 0 comments

Comments

@DilumAluthge
Copy link
Contributor

I'm just putting this here since it's semi-relevant, but also because Slack is ephemeral.

julia> import Pkg

julia> function load_manifest(; kwargs...)
           pkg = Pkg.PackageSpec(; kwargs...)
           return load_manifest(pkg)
       end

julia> function load_manifest(pkg::Pkg.Types.PackageSpec, shared::Bool = true)
           ctx = Pkg.Types.Context()
           return load_manifest(ctx, pkg, shared)
       end

julia> function load_manifest(ctx::Pkg.Types.Context, pkg::Pkg.Types.PackageSpec, shared::Bool = true)
           Pkg.Types.handle_repo_develop!(ctx, pkg, shared)
           devpath = Pkg.Types.devpath(ctx, pkg.name, shared)
           Pkg.activate(devpath)
           Pkg.instantiate()
           return devpath
       end

julia> load_manifest(url = "https://github.com/JuliaComputing/ToyFHE.jl")

julia> using ToyFHE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant