Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

has_persistent_tasks fails if precompilation fails? #315

Open
ericphanson opened this issue Jan 7, 2025 · 3 comments
Open

has_persistent_tasks fails if precompilation fails? #315

ericphanson opened this issue Jan 7, 2025 · 3 comments

Comments

@ericphanson
Copy link

ericphanson commented Jan 7, 2025

I am seeing:

ERROR: Method overwriting is not permitted during Module precompilation. Use `__precompile__(false)` to opt-out of precompilation.
┌ Error: Unexpected error: /tmp/jl_W1uV4ruvUb/done.log was not created, but precompilation exited
└ @ Aqua ~/.julia/packages/Aqua/bBjXC/src/persistent_tasks.jl:118
Persistent tasks: Test Failed at /home/runner/.julia/packages/Aqua/bBjXC/src/persistent_tasks.jl:38
  Expression: !(has_persistent_tasks(package; kwargs...))

Stacktrace:
 [1] macro expansion
   @ /opt/hostedtoolcache/julia/1.10.7/x64/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/bBjXC/src/persistent_tasks.jl:38
 [3] test_persistent_tasks
   @ ~/.julia/packages/Aqua/bBjXC/src/persistent_tasks.jl:34 [inlined]
 [4] #test_persistent_tasks#69
   @ ~/.julia/packages/Aqua/bBjXC/src/persistent_tasks.jl:43 [inlined]
 [5] test_persistent_tasks
   @ ~/.julia/packages/Aqua/bBjXC/src/persistent_tasks.jl:42 [inlined]
 [6] macro expansion
   @ ~/.julia/packages/Aqua/bBjXC/src/Aqua.jl:105 [inlined]
 [7] macro expansion
   @ /opt/hostedtoolcache/julia/1.10.7/x64/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/bBjXC/src/Aqua.jl:104
Test Summary:                                | Pass  Fail  Total     Time
Aqua                                         |    9     1     10  1m42.0s
  Method ambiguity                           |              None     0.0s
  Unbound type parameters                    |    1            1     0.1s
  Undefined exports                          |    1            1     0.0s
  Compare Project.toml and test/Project.toml |    1            1     0.0s
  Stale dependencies                         |    1            1    43.4s
  Compat bounds                              |    4            4     0.4s
  Piracy                                     |    1            1     0.1s
  Persistent tasks                           |          1      1    49.5s

on a package for which precompilation failed (due to method overwriting). I think perhaps precompilation failing led to the done.log not being written? So I wonder if this is a false positive for the "Persistent tasks" test (although of course it reflects a different problem with the package).

@j-fu
Copy link

j-fu commented Feb 12, 2025

So this is on Julia 1.10. How does this look on 1.11 ?
May be similar to SciML/LinearSolve.jl#573 ? May be, then a band-aid would be to let this test always pass on 1.10 as well (similar as currently with 1.9 and below).

@ericphanson
Copy link
Author

I don't think this issue is a julia-version specific thing. The problem is the test itself. If precompilation fails for any reason, then the has_persistent_tasks test fails. Precompilation failing is a problem but it is unrelated to persistent tasks, and the has_persistent_tasks failing can mislead users since it adds additional error messages unrelated to the actual problem.

@j-fu
Copy link

j-fu commented Feb 17, 2025

My original problem (failing precompilation) is gone due to upstream fixes, in that respect we might close this, but there is still the point of misleading false positives here. So we may keep it open unless it appears that it is not worthwhile to dedicate time to it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants