meyercm / shorter_maps

Elixir ~M sigil for map shorthand. `~M{id, name} ~> %{id: id, name: name}`
MIT License
233 stars 11 forks source link

This library is broken in elixir `1.16` #17

Open sjmueller opened 10 months ago

sjmueller commented 10 months ago

After upgrading to elixir 1.16.0, we now get compile time errors everywhere shorter_maps is used:

** (ArgumentError) interpolation is not supported with the ~M sigil
    (shorter_maps 2.2.5) expanding macro: ShorterMaps.sigil_M/2

def upsert_challenge_template(user_access, data) do
    ~M{user_id, set_id} = user_access
end

https://github.com/meyercm/shorter_maps/blob/master/lib/shorter_maps.ex#L69

Also note the same problem exists with lowercase ~m sigil.

abshierjoel commented 6 months ago

@sjmueller for what it's worth, I'm maintaining a fork of this for several of my own projects: abshierjoel/shorter_maps. I'll work on getting it published to hex in the near future.