Stream: helpdesk (published)

Topic: Start process with unset project


view this post on Zulip Timothy (Mar 08 2023 at 14:38):

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.

view this post on Zulip Fredrik Ekre (Mar 09 2023 at 07:23):

If you haven't set JULIA_LOAD_PATH then those area already equivalent.

view this post on Zulip Timothy (Mar 09 2023 at 08:34):

I'm thinking of setting JULIA_LOAD_PATH to @v#.#:@stdlib then running push!(LOAD_PATH, "@") and set_active_project(<project>) might work.

view this post on Zulip Fredrik Ekre (Mar 09 2023 at 08:37):

What are you trying to achieve? If you can manipulate the environment variable I would do only that and nothing from Julia.

view this post on Zulip Timothy (Mar 09 2023 at 08:54):

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.

view this post on Zulip Fredrik Ekre (Mar 09 2023 at 08:59):

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