otp icon indicating copy to clipboard operation
otp copied to clipboard

compiler: Enable warn_deprecated_catch by default

Open richcarl opened this issue 1 month ago • 2 comments

I think the warnings for deprecated catches should be turned on by default in OTP 29.

richcarl avatar Nov 30 '25 09:11 richcarl

CT Test Results

    28 files     901 suites   6h 15m 48s ⏱️  8 779 tests  8 355 ✅   424 💤 0 ❌ 20 879 runs  19 199 ✅ 1 680 💤 0 ❌

Results for commit 58a6972a.

:recycle: This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

github-actions[bot] avatar Nov 30 '25 09:11 github-actions[bot]

Finally a green buld on this too after rebasing.

richcarl avatar Dec 11 '25 18:12 richcarl

OTB approved this pull request yesterday.

Unfortunately, I can't add the PR to our daily builds yet, because out internal CI tries to build rebar3 and https://github.com/erlware/erlware_commons, and both fail to build because they use the old-style catch. I will need to update the CI to disable the warning; I might not be able to do that until next year.

Might I suggest that you submit pull requests to both of those projects to disable the warning?

bjorng avatar Dec 19 '25 08:12 bjorng

Might I suggest that you submit pull requests to both of those projects to disable the warning?

Tried to make a patch, but their build scripts are doing my head in. A quick fix that works for me is to define export ERL_COMPILER_OPTIONS='[nowarn_deprecated_catch]' in your CI when it builds rebar3.

richcarl avatar Dec 19 '25 12:12 richcarl