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

[#1152] Emit error in case the module name does not coincide with the filename #1156

Merged
merged 1 commit into from
Dec 12, 2021

Conversation

robertoaloi
Copy link
Member

Description

Fixes #1152 .

@robertoaloi robertoaloi merged commit 30c8bde into main Dec 12, 2021
@robertoaloi robertoaloi deleted the 1152-emit-module-name-error branch December 12, 2021 09:28
[];
false ->
Message =
io_lib:format("Module name '~s' does not match file name '~ts'",
Copy link
Contributor

Choose a reason for hiding this comment

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

in case of a unicode module name you probably need the t modifier also for Module not just Basename

Copy link
Member Author

Choose a reason for hiding this comment

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

The message is equivalent to the one in:

https://github.com/erlang/otp/blob/656690cb4f9d8b8942b8be0b7aad54f86cf7fee0/lib/compiler/src/compile.erl#L330

According to https://www.erlang.org/doc/apps/stdlib/unicode_usage.html:

Module names, application names, and node names are still restricted to the ISO Latin-1 range

Copy link
Contributor

Choose a reason for hiding this comment

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

oh I see 👍

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.

Module file name mismatch compiler error not exposed
2 participants