Skip to content

Aqua precompile warning surfaces during package generation #4

Description

@ultimatile

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

  1. 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.
  2. Run jjtc create SomePackage (or invoke the Julia entry point directly so that stderr is visible).
  3. 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

  1. 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.
  2. Suppress the auto-precompile pass during generation by setting JULIA_PKG_PRECOMPILE_AUTO=0 for the subprocess that drives template generation.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions