Emit deprecation warnings without switching tasks.#831
Conversation
`Base.depwarn` logs through the active logger, and the I/O involved can switch tasks. That is illegal while holding the typeinf lock, which our `@locked` compilation entry points do on Julia 1.10/1.11, and caused hangs (#830). Replace it with `safe_depwarn`, which writes the warning synchronously to `Core.stderr` like `@safe_warn` does. Caller attribution, warning once per call site, and throwing under `--depwarn=error` still behave like `Base.depwarn`; on 1.12+, where compilation doesn't hold the typeinf lock, it just forwards there. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #831 +/- ##
==========================================
+ Coverage 79.28% 79.36% +0.07%
==========================================
Files 25 25
Lines 4562 4584 +22
==========================================
+ Hits 3617 3638 +21
- Misses 945 946 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The call-site dedup set was typed too narrowly: interpreted call sites (e.g., calls from top-level scope) are identified by a Base.InterpreterIP rather than a plain instruction pointer, making safe_depwarn throw a conversion error. Widen the set's key type, and add a regression test. Also avoid unqualified `findall` in the new testset: it resolved the binding to Base.findall, silently breaking the later import of Core.Compiler.findall used by the StackedMethodTable tests on 1.10/1.11. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Thanks, that's a much better solution! Would you mind also bumping the GPUCompiler version as well as the CUDA compat, so we can fix CoolPDLP CI? |
Releasing CUDA.jl is quite a bit of effort, and won't happen right away. Or what do you mean? |
|
I mean that the currently released CUDA version does not seem to be compatible with GPUCompiler 1.18. If I install the latest release of CUDA.jl inside an environment and then try to add GPUCompiler#main, I get: Is there a reason CUDA.jl declares such strict compat bounds for GPUCompiler? |
|
Yes, GPUCompiler switched to |
|
Ah, I see! Any ETA when CUDA will be compatible with the latest GPUCompiler again? |
|
Since this is a bugfix, should we perhaps backport this to GPUCompiler 1.17? |
|
Yes, backporting would be fine too. |
`Base.depwarn` logs through the active logger, and the I/O involved can switch tasks. That is illegal while holding the typeinf lock, which our `@locked` compilation entry points do on Julia 1.10/1.11, and caused hangs (#830). Replace it with `safe_depwarn`, which writes the warning synchronously to `Core.stderr` like `@safe_warn` does. Caller attribution, warning once per call site, and throwing under `--depwarn=error` still behave like `Base.depwarn`; on 1.12+, where compilation doesn't hold the typeinf lock, it just forwards there. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Base.depwarnlogs through the active logger, and the I/O involved can switch tasks. That is illegal while holding the typeinf lock, which our@lockedcompilation entry points do on Julia 1.10/1.11, and caused hangs (#830).Replace it with
safe_depwarn, which writes the warning synchronously toCore.stderrlike@safe_warndoes. Caller attribution, warning once per call site, and throwing under--depwarn=errorstill behave likeBase.depwarn; on 1.12+, where compilation doesn't hold the typeinf lock, it just forwards there.Closes #831