Skip to content

[release-1.17] Emit deprecation warnings without switching tasks. (backport #831)#834

Open
maleadt wants to merge 1 commit into
release-1.17from
tb/backport
Open

[release-1.17] Emit deprecation warnings without switching tasks. (backport #831)#834
maleadt wants to merge 1 commit into
release-1.17from
tb/backport

Conversation

@maleadt
Copy link
Copy Markdown
Member

@maleadt maleadt commented Jun 5, 2026

Backport #831
cc @simeonschaub

`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>
@maleadt maleadt changed the title Emit deprecation warnings without switching tasks. (#831) [release-1.17] Emit deprecation warnings without switching tasks. (backport #831) Jun 5, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

❌ Patch coverage is 67.74194% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.38%. Comparing base (5e4c84f) to head (a5aeeba).

Files with missing lines Patch % Lines
src/driver.jl 0.00% 4 Missing ⚠️
src/deprecated.jl 0.00% 3 Missing ⚠️
src/irgen.jl 0.00% 2 Missing ⚠️
src/utils.jl 95.45% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff                @@
##           release-1.17     #834      +/-   ##
================================================
+ Coverage         79.30%   79.38%   +0.07%     
================================================
  Files                25       25              
  Lines              4542     4564      +22     
================================================
+ Hits               3602     3623      +21     
- Misses              940      941       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@simeonschaub simeonschaub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants