JuliaTesting / Aqua.jl

Auto QUality Assurance for Julia packages
MIT License
334 stars 24 forks source link

Persistent tasks check false positives due to log errors #269

Closed Octogonapus closed 5 months ago

Octogonapus commented 5 months ago

I'm getting this error from the persistent tasks check:

┌ Error: Unexpected error: /tmp/jl_5QBoPoj8tc/done.log was not created, but precompilation exited
└ @ Aqua ~/.julia/packages/Aqua/rTj6Y/src/persistent_tasks.jl:159
  Activating project at `/tmp/jl_lNvho8`
Persistent tasks: Test Failed at /home/salmon/.julia/packages/Aqua/rTj6Y/src/persistent_tasks.jl:80
  Expression: !(has_persistent_tasks(package; kwargs...))

Stacktrace:
 [1] macro expansion
   @ ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/Test/src/Test.jl:672 [inlined]
 [2] test_persistent_tasks(package::Base.PkgId; broken::Bool, kwargs::@Kwargs{})
   @ Aqua ~/.julia/packages/Aqua/rTj6Y/src/persistent_tasks.jl:80
 [3] test_persistent_tasks
   @ ~/.julia/packages/Aqua/rTj6Y/src/persistent_tasks.jl:76 [inlined]
 [4] #test_persistent_tasks#61
   @ ~/.julia/packages/Aqua/rTj6Y/src/persistent_tasks.jl:85 [inlined]
 [5] test_persistent_tasks
   @ ~/.julia/packages/Aqua/rTj6Y/src/persistent_tasks.jl:84 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/Aqua/rTj6Y/src/Aqua.jl:101 [inlined]
 [7] macro expansion
   @ ~/.julia/juliaup/julia-1.10.2+0.x64.linux.gnu/share/julia/stdlib/v1.10/Test/src/Test.jl:1577 [inlined]
 [8] test_all(testtarget::Module; ambiguities::Bool, unbound_args::Bool, undefined_exports::Bool, project_extras::Bool, stale_deps::Bool, deps_compat::Bool, piracies::Bool, persistent_tasks::Bool)
   @ Aqua ~/.julia/packages/Aqua/rTj6Y/src/Aqua.jl:100
Test Summary:    | Fail  Total  Time
Persistent tasks |    1      1  1.7s

Using Julia v1.10.2. My project file is:

name = "persistenttest"
uuid = "57a7f931-a6fc-4b01-a2d7-6d729ee43e20"
version = "0.1.0"

[deps]
libpng_jll = "b53b4c65-9356-5827-b1ea-8c7a1a84506f"

[compat]
Aqua = "=0.8.0"
libpng_jll = "=1.6.43"
Test = "1"
julia = "1.9"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Aqua", "Test"]

My source is:

module persistenttest

using libpng_jll

end # module persistenttest

My test is:

using Aqua, persistenttest
Aqua.test_all(persistenttest)

To my understanding, this example project should pass the check. I'm not sure what's happening with that log file not being created. Maybe because the jll is already precompiled?

lgoettgens commented 5 months ago

Does the same problem occur with Aqua 0.8.4? In general, it should be safe to specify the compat as 0.8.

lgoettgens commented 5 months ago

I can replicate the issue with your Project.toml. However, updating the Aqua compat entry to a current version (e.g. =0.8.4 or even better 0.8) makes everything work again.

Octogonapus commented 5 months ago

Ah sorry I didn't even notice I wasn't on the latest version. I was trying out downgradeci earlier and missed that