-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Mix Release breaks google_api_compute (file system case sensitivity and elixir 1.16/1.17 issue) #13816
Comments
This is a bug in the library. It is defining both lowercase and uppercase module names: Therefore, in a case insensitive file system, both will write to the same .beam file, but only one of them will exist. The library should not define duplicate modules once the casing is removed. :) |
Why does this only show in
|
|
I may have missed this, but is defining modules, say Foo and FOO, an error or just not recommended? Should elixir at least show a warning if such module names are used? |
I should also point out that this error occurs on 1.17 for case-sensitive file systems. From your original explanation, I would think that it should not be a problem for those filesystems. |
The Erlang VM is fine with having modules |
Is there an explanation why this breaks releases for all file systems in 1.17 but worked for case-sensitive file systems in 1.16? An issue was filed with the library July 2021 googleapis/elixir-google-api#8174 so I don't expect any updates on this to be timely. I'm rather new to the I suppose our options at this point are to fork |
From the issue above, it seems it did happen in earlier Elixir versions. I would also expect it to happen on 1.16, so I will investigate it, but I’d say the 1.17 behavior is the correct one. I also wonder if you can fix this by forking and removing the additional file with duplicate definitions. |
I've been running in production with 1.16.2 and didn't notice the issue until trying to move to 1.17. |
Elixir and Erlang/OTP versions
Elixir 1.16.2 and 1.17.2
Erlang 27
Operating system
Darwin Kernel Version 23.4.0 and FreeBSD 14.1-RELEASE
Current behavior
Create a new phx project and add the dependency:
Expected behavior
On MacOS, this app will compile and run with
iex -S mix phx.server
.However, running via
mix release
fails.fails on MacOS for both Elixir 1.16.2 and 1.17.2 (and master).
This appears to be an existing issue for case-insensitive file systems but didn't show up in case-sensitive file systems until Elixir 1.17.
Running the above on FreeBSD 14.1 Release (case sensitive filesystem), the
mix release
issue does not present for Elixir 1.16.2 but does surface for Elixir 1.17.2 and master.The text was updated successfully, but these errors were encountered: