Summary
When generating a new package with the Tests(aqua=true, project=true) plugin via jjtc create (the ArgParse-based CLI provided by this repository), the following warning is printed during generation:
The following 1 direct dependency failed to precompile:
Aqua
Error: Missing source file for Base.PkgId(Base.UUID("4c88cf16-eb10-579e-8560-4a9242c79595"), "Aqua"
Activating project at `~/.julia/environments/apps/PkgTemplatesCommandLineInterface`
The package itself is generated correctly (the resulting test/Project.toml and test/Manifest.toml look fine, and CI on the generated package passes), so this is a cosmetic issue — but the message is alarming and is hidden by the Python CLI (JuliaPkgTemplatesCLI) only because it captures output and discards it on success.
Reproduction
- Configure the Tests plugin to enable both Aqua and a separate test project, e.g. via
jtc config set --tests aqua=true --tests project=true.
- Run
jjtc create SomePackage (or invoke the Julia entry point directly so that stderr is visible).
- Observe the warning shown above. Generation still finishes successfully.
Suspected cause
PkgTemplates.Tests(project=true) calls Pkg.add(AQUA_DEP) inside the generated package's test/ directory. After that block, control returns to the activated app environment at ~/.julia/environments/apps/PkgTemplatesCommandLineInterface. That Project.toml declares Aqua only in [extras] (with a [compat] Aqua = "0.8" entry), and the corresponding Manifest.toml has no Aqua entry. When Julia's auto-precompile pass runs after the project switch, it appears to consider Aqua a direct dependency that needs precompilation, but cannot find a source path for it in the parent environment — hence the "Missing source file" warning.
Possible fixes
- Move
Aqua from [extras] to [deps] in this repository's Project.toml, so the parent app environment has a resolved Aqua entry. This may or may not be desirable depending on whether Aqua is used outside of tests; currently it is referenced only by test/runtests.jl.
- Suppress the auto-precompile pass during generation by setting
JULIA_PKG_PRECOMPILE_AUTO=0 for the subprocess that drives template generation.
- Investigate the Pkg behavior to confirm the root cause before applying (1) or (2).
For reference, the Python wrapper currently hides this warning by running Julia with subprocess.run(..., capture_output=True, check=True) and discarding the captured streams on success — so the issue is invisible there but still happens.
Summary
When generating a new package with the
Tests(aqua=true, project=true)plugin viajjtc create(the ArgParse-based CLI provided by this repository), the following warning is printed during generation:The package itself is generated correctly (the resulting
test/Project.tomlandtest/Manifest.tomllook fine, and CI on the generated package passes), so this is a cosmetic issue — but the message is alarming and is hidden by the Python CLI (JuliaPkgTemplatesCLI) only because it captures output and discards it on success.Reproduction
jtc config set --tests aqua=true --tests project=true.jjtc create SomePackage(or invoke the Julia entry point directly so that stderr is visible).Suspected cause
PkgTemplates.Tests(project=true)callsPkg.add(AQUA_DEP)inside the generated package'stest/directory. After that block, control returns to the activated app environment at~/.julia/environments/apps/PkgTemplatesCommandLineInterface. ThatProject.tomldeclaresAquaonly in[extras](with a[compat] Aqua = "0.8"entry), and the correspondingManifest.tomlhas noAquaentry. When Julia's auto-precompile pass runs after the project switch, it appears to consider Aqua a direct dependency that needs precompilation, but cannot find a source path for it in the parent environment — hence the "Missing source file" warning.Possible fixes
Aquafrom[extras]to[deps]in this repository'sProject.toml, so the parent app environment has a resolved Aqua entry. This may or may not be desirable depending on whether Aqua is used outside of tests; currently it is referenced only bytest/runtests.jl.JULIA_PKG_PRECOMPILE_AUTO=0for the subprocess that drives template generation.For reference, the Python wrapper currently hides this warning by running Julia with
subprocess.run(..., capture_output=True, check=True)and discarding the captured streams on success — so the issue is invisible there but still happens.