Feature request: --project=@script_dir

greatpet
Thu, 16 Jan 2025 11:47:21 +0000
Internals & Design

I’d like to run a command like

julia --project=@script_dir long/path/to/my/package/src/script.jl

rather than what I currently have to use, where the path is repeated verbatim

julia --project=long/path/to/my/package long/path/to/my/package/src/script.jl

Another inconvenient workaround is using Pkg within the script to activate the environment of @__DIR__ or the parent path thereof.

The proposed behavior is that julia wil recursively search the user-supplied script_dir and parent directories until Project.toml is found and use that as the virtual environment. What do you think?

4 posts - 3 participants