Pkg.jl: Feature request: easy "throw away" environments

Created on 22 May 2019  路  4Comments  路  Source: JuliaLang/Pkg.jl

Would it be nice if we had a julia --project=@tmp command (syntax TBD) for creating a "throw away" environment whcih exists only for the duration of the repl session?

E.g. operates in a tmp directory and automatically deletes /Project.toml and / Manifest.toml afterwards; so julia --project=@tmp again gives a new "throw away" environment.

Use case:

  • Not editing any specifc package, so don't want julia --project=@.,
  • Want to test something out, e.g. try reproduce a bug report
  • Load julia and inevitably end up adding packages, e.g. the bugged package,
  • Your "base" v1.1 environment ends up having tons of packages <-- something we might wish to avoid.
API feature

Most helpful comment

I don't really think there needs to be a command line option for this. It should be enough that Pkg has some easy way of activating the temp env.

All 4 comments

workaround suggested by @fredrikekre on slack:
julia --project=(mktemp -d) (fish) or
julia --project=$(mktemp -d) (sh)

I don't really think there needs to be a command line option for this. It should be enough that Pkg has some easy way of activating the temp env.

Why close, would still be nice to have it available in Pkg?

I still want this very regularly.

At least 4 timed in the last 2 days.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StefanKarpinski picture StefanKarpinski  路  3Comments

cossio picture cossio  路  3Comments

moustachio-belvedere picture moustachio-belvedere  路  3Comments

cscherrer picture cscherrer  路  3Comments

KristofferC picture KristofferC  路  4Comments