I'm trying to create Julia processes that aren't initially bound to a project, and then bind themselves to a project on demand. I'm wondering if I can create a result similar to julia --project=X
if a Julia process is created with an "unset project" (or similar) such that a Pkg.activate(X)
(or similar) yeilds a result indistinguishable from julia --project=X
.
If you haven't set JULIA_LOAD_PATH
then those area already equivalent.
I'm thinking of setting JULIA_LOAD_PATH
to @v#.#:@stdlib
then running push!(LOAD_PATH, "@")
and set_active_project(<project>)
might work.
What are you trying to achieve? If you can manipulate the environment variable I would do only that and nothing from Julia.
I'm trying to create Julia processes that aren't initially bound to a project, and then bind themselves to a project on demand.
I have a way of creating Julia daemon processes for a particular project, but when they start up they take ~2s to do the setup and compiling. So, I'm thinking I could perhaps create an "unbound" daemon process in reserve, and then when requested simply set its project and hand it over, instead of going through the whole initialisation process at that point.
Okay, the I would just do push!(empty!(LOAD_PATH), "new/project")
or something like that
Last updated: Oct 02 2023 at 04:34 UTC