Skip to content

Fix compilation with OTP29#611#219

Merged
elbrujohalcon merged 2 commits intomainfrom
otp_29
Mar 20, 2026
Merged

Fix compilation with OTP29#611#219
elbrujohalcon merged 2 commits intomainfrom
otp_29

Conversation

@NelsonVides
Copy link
Copy Markdown
Collaborator

When compiling with OTP29:

===> Compiling src/wpool_time_checker.erl failed
     ┌─ src/wpool_time_checker.erl:
     │
 137 │      _ = [_ = catch Mod:Fun(Args) || {Mod, Fun} <- Handlers],
     │               ╰── 'catch ...' is deprecated; please use 'try ... catch ... end' instead.
Compile directive 'nowarn_deprecated_catch' can be used to suppress
warnings in selected modules.

This also has the advantage that, catch forcefully creates a
stacktrace, only to be discarded, which is a performance waste; using
try-catch we can explicitly say we don't want the stacktrace, and the
stack won't be threaded.

Also took the chance to update some dependencies and plugins.

```
===> Compiling src/wpool_time_checker.erl failed
     ┌─ src/wpool_time_checker.erl:
     │
 137 │      _ = [_ = catch Mod:Fun(Args) || {Mod, Fun} <- Handlers],
     │               ╰── 'catch ...' is deprecated; please use 'try ... catch ... end' instead.
Compile directive 'nowarn_deprecated_catch' can be used to suppress
warnings in selected modules.
```

This also has the advantage that, `catch` forcefully creates a
stacktrace, only to be discarded, which is a performance waste; using
`try-catch` we can explicitly say we don't want the stacktrace, and the
stack won't be threaded.

Also took the chance to update some dependencies and plugins.
Copy link
Copy Markdown
Member

@elbrujohalcon elbrujohalcon left a comment

Choose a reason for hiding this comment

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

Feel free to generate a new release if you need it, @NelsonVides

@elbrujohalcon elbrujohalcon merged commit 6d33506 into main Mar 20, 2026
2 checks passed
@elbrujohalcon elbrujohalcon deleted the otp_29 branch March 20, 2026 15:34
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