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

fix(dialyzer): the pattern false can never match the type true (#21) #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NobbZ
Copy link

@NobbZ NobbZ commented Feb 24, 2023

Due to the fact, that the after compile hook was generated into each module, and used
the modules attributes directly, from dialyzers point of view, all the branches were
based on constant values and there was no way that ever any condition changes.

This is solved by moving the implementation of the __after_compile__/2 hook into the
Que.Worker module, where it accesses the passed in environment to check the validity
of the freshly compiled module.

As a side effect, this also reduces the worker modules sizes slightly, as the __after_compile__/2
does not have to be compiled into each module anymore, when its sole purpose on runtime
is to only return nil!

Fix #21

@SeedyROM
Copy link

I merged this into my PR to remove deprecation warnings and use newer OTP supervisors. Many 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.

The pattern 'false' can never match the type 'true'
2 participants