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

Compilation Error When updating to ex_cldr 2.38.0 #42

Closed
tomciopp opened this issue Apr 22, 2024 · 12 comments
Closed

Compilation Error When updating to ex_cldr 2.38.0 #42

tomciopp opened this issue Apr 22, 2024 · 12 comments

Comments

@tomciopp
Copy link
Contributor

elixir: 1.16.2
erlang: 26.2.4
OS: MacOS 14.4.1

I'm running into issues compiling this package after updating to the latest releases of ex_cldr. I get the following error message.

==> ex_cldr_territories
Compiling 3 files (.ex)

== Compilation error in file lib/cldr/territory.ex ==
** (Protocol.UndefinedError) protocol Enumerable not implemented for :AW of type Atom
    (elixir 1.16.2) lib/enum.ex:1: Enumerable.impl_for!/1
    (elixir 1.16.2) lib/enum.ex:166: Enumerable.reduce/3
    (elixir 1.16.2) lib/enum.ex:4396: Enum.map/2
    lib/cldr/territory.ex:16: anonymous fn/1 in :elixir_compiler_2.__MODULE__/1
    (elixir 1.16.2) lib/map.ex:257: Map.do_map/2
    (elixir 1.16.2) lib/map.ex:257: Map.do_map/2
    (elixir 1.16.2) lib/map.ex:251: Map.new_from_map/2
    lib/cldr/territory.ex:14: (module)
could not compile dependency :ex_cldr_territories, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile ex_cldr_territories --force", update it with "mix deps.update ex_cldr_territories" or clean it with "mix deps.clean ex_cldr_territories"

I'm guessing that there's been some API change somewhere that has not been fixed upstream. Let me know if you need any more info or help debugging.

@pejrich
Copy link

pejrich commented Apr 22, 2024

The following fixed it for me:

{:ex_cldr_territories, github: "elixir-cldr/cldr_territories", override: true},

For some reason line 16 of the territories.ex file isn't present in my deps folder:

    {k, v} when is_atom(v) -> {:"#{k}", v}

Maybe a new release needs to be pushed.

@tomciopp
Copy link
Contributor Author

Yeah this looks like it was fixed in #37. Since 2.38.0 is out there should probably be a new release.

@atonse
Copy link

atonse commented Apr 22, 2024

Verified that @pejrich's fix (using a direct GitHub branch reference) fixed it. Hopefully a new release is imminent.

@kipcole9
Copy link
Collaborator

@Schultzer is working on a new release (there is another PR I submitted ready for review). Sorry for the delay, I'm sure it will be out soon.

@Schultzer
Copy link
Collaborator

@tomciopp I'm sorry for not releasing it yet, but can you try main? I want to ensure that our new integration test, which you can find here: elixir-cldr/cldr#230, isn't causing any issues.

@atonse
Copy link

atonse commented Apr 25, 2024

Just wanted to say (since the maintainers are on here), thank you for all your work on these libraries!

@Schultzer
Copy link
Collaborator

Thanks, @atonse; it would be highly appreciated if you could also test-drive main.

@atonse
Copy link

atonse commented Apr 26, 2024

@Schultzer sure thing. cloning now and seeing if there are any issues.

@atonse
Copy link

atonse commented Apr 26, 2024

@Schultzer I tested the specific functionality where we use this in our app (a country list dropdown), and that worked perfectly.

I also ran mix test in main and all tests passed.

@Schultzer
Copy link
Collaborator

Closed by #37 and #43.

@SteffenDE
Copy link

Will there be a new release on hex soon? The latest version there is still 2.8.1.

@Schultzer
Copy link
Collaborator

Will there be a new release on hex soon? The latest version there is still 2.8.1.

Thanks for your patience; I've just released a new version.

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

No branches or pull requests

6 participants