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 nif declarations in esp_adc module #1354

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

pguyot
Copy link
Collaborator

@pguyot pguyot commented Oct 23, 2024

Use proper erlang:nif_error(undefined) so that dialyzer doesn't consider the functions never return.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

Copy link
Collaborator

@bettio bettio left a comment

Choose a reason for hiding this comment

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

If you don't mind (and it doesn't take too much time) it would be a good fix for release-0.6.

Use proper `erlang:nif_error(undefined)` so that dialyzer doesn't consider
the functions never return.

Signed-off-by: Paul Guyot <[email protected]>
@pguyot pguyot changed the base branch from main to release-0.6 November 3, 2024 09:43
@UncleGrumpy
Copy link
Collaborator

Thanks for this @pguyot, I didn’t even think to test this with dialyzer because I have had some difficulties using it on AtomVM apps. I seem to get warnings that lead me to believe it is checking against OTP libraries and not AtomVM stdlib.

@pguyot
Copy link
Collaborator Author

pguyot commented Nov 3, 2024

Thanks for this @pguyot, I didn’t even think to test this with dialyzer because I have had some difficulties using it on AtomVM apps. I seem to get warnings that lead me to believe it is checking against OTP libraries and not AtomVM stdlib.

Now that AtomVM installs .erl modules, we should create rebar3 atomvm dialyzer that will do the right thing: build a plt from AtomVM libs and run dialyzer on sources with this plt.

@UncleGrumpy
Copy link
Collaborator

Now that AtomVM installs .erl modules, we should create rebar3 atomvm dialyzer that will do the right thing: build a plt from AtomVM libs and run dialyzer on sources with this plt.

This makes perfect sense, it felt like something was missing ;-)

@bettio bettio merged commit 4c45ca7 into atomvm:release-0.6 Nov 3, 2024
72 checks passed
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.

3 participants