prometheus.ex icon indicating copy to clipboard operation
prometheus.ex copied to clipboard

Compilation error with Elixir 1.14.0

Open optikfluffel opened this issue 2 years ago • 5 comments

== Compilation error in file lib/prometheus/buckets.ex ==
** (UndefinedFunctionError) function Kernel.Utils.defdelegate/2 is undefined or private. Did you mean:

      * defdelegate_all/3
      * defdelegate_each/2

    (elixir 1.14.0) Kernel.Utils.defdelegate({:new, [line: 18], [{:arg, [line: 18], nil}]}, [])
    lib/prometheus/buckets.ex:18: (module)

optikfluffel avatar Sep 03 '22 07:09 optikfluffel

I've seen this error come up when compiling plemora, and I believe the issue is actually in the plemora fork (https://git.pleroma.social/pleroma/elixir-libraries/prometheus.ex/ and not in this repo.

@feld I think you maintain the fork? Apologies if I'm pinging the wrong person.

mveytsman avatar Sep 04 '22 16:09 mveytsman

@mveytsman I also came across this when trying to run Pleroma with the new Elixir version. But the error also comes up when you clone current master of this repo here and try to compile it.

optikfluffel avatar Sep 07 '22 13:09 optikfluffel

Should be fixed by #47 (@lanodan is a Pleroma maintainer as well)

seanking2919 avatar Sep 08 '22 03:09 seanking2919

Hi @optikfluffel , did you solve this issue? I am new to using Elixir and am running into this while compiling another project. I can't tell if the problem is my setup or a bug elsewhere.

Running with Elixir 1.14.0 & Erlang 25.0.4 from asdf version manager.

aronsonben avatar Sep 08 '22 14:09 aronsonben

@aronsonben For now you should be able to change the deps entry for prometheus.ex in your mix.exs file to something like

{:prometheus_ex, git: "https://github.com/lanodan/prometheus.ex", branch: "fix/elixir-1.14", override: true}

and then have to change it back, when #47 is merged and released.

optikfluffel avatar Sep 08 '22 15:09 optikfluffel