JuliaLang / JuliaLang/PackageCompiler.jl
`create_sysimage` gets confused by unrelated projects matching `JULIA_PROJECT`
- Dominant language
- Julia
- Stars
- 1.6k
- Forks
- 205
- Avg merge
- 18h 37m
- Merged PRs (30d)
- 7
Description
This is on julia 1.8.4, PC.jl 2.1.2.
A MWE can be:
* `$ mkdir /tmp/jl_project; cd /tmp/jl_project`
* `$ julia --project=.`
* `]generate XYZ`; `]dev ./XYZ`
* `$ mkdir image; cd image; julia --startup-file=no`
* `]activate --temp`
* `]add InlineTest`
* `ENV["JULIA_PROJECT"] = "@."`
* `using PackageCompiler; create_sysimage(sysimage_path="./image.so")`
This results in the following error:
```
julia> using PackageCompiler; create_sysimage(sysimage_path="./image.so")
0 dependencies successfully precompiled in 0 seconds
ERROR: The following 1 direct dependency failed to precompile:
XYZ [12bc79f3-ea85-4693-851d-069bcf1ea768]
Error: Missing source file for XYZ [12bc79f3-ea85-4693-851d-069bcf1ea768
Stacktrace:
[...]
```
It doesn't seem correct to consider the project at "/tmp/jl_project" inside `create_sysimage`, as the current active project is something else.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the listed MWE with Julia 1.8.4, PC.jl 2.1.2, and the create_sysimage entry point while JULIA_PROJECT is set to "@.". Compare behavior with and without the unrelated active project. Done means create_sysimage no longer treats that project as a direct dependency and the MWE completes without the missing-source-file error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100