liveforeverx / dlex

Dlex is a gRPC based client for the Dgraph database.
Apache License 2.0
78 stars 21 forks source link

Compilation error in file lib/dlex/api.ex #95

Closed hudsonbay closed 4 years ago

hudsonbay commented 4 years ago

I'm trying to integrate dlex to a new fresh Phoenix project.

These are my deps: defp deps do [ {:phoenix, "~> 1.5.4"}, {:phoenix_live_view, "~> 0.13.0"}, {:floki, ">= 0.0.0", only: :test}, {:phoenix_html, "~> 2.11"}, {:phoenix_live_reload, "~> 1.2", only: :dev}, {:phoenix_live_dashboard, "~> 0.2"}, {:telemetry_metrics, "~> 0.4"}, {:telemetry_poller, "~> 0.4"}, {:gettext, "~> 0.11"}, {:jason, "~> 1.0"}, {:plug_cowboy, "~> 2.0"}, {:cowlib, "~> 2.9.1", override: true}, {:dlex, "~> 0.1.0"}, ] end

I can do mix deps.get without any problem but when I try to compile the project it shows this error:

== Compilation error in file lib/dlex/api.ex == ** (UndefinedFunctionError) function Dlex.Api.LinRead.Sequencing.key/1 is undefined (module Dlex.Api.LinRead.Sequencing is not available) Dlex.Api.LinRead.Sequencing.key(0) lib/protobuf/dsl.ex:33: anonymous fn/2 in Protobuf.DSL."MACRO-__before_compile__"/2 (elixir 1.10.1) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3 expanding macro: Protobuf.DSL.__before_compile__/1 lib/dlex/api.ex:192: Dlex.Api.LinRead (module) could not compile dependency :dlex, "mix compile" failed. You can recompile this dependency with "mix deps.compile dlex", update it with "mix deps.update dlex" or clean it with "mix deps.clean dlex"

I have to say that without {:dlex, "~> 0.1.0"} declared on my mix.ex file everyhting works fine. The problem is when I add dlex to my deps

liveforeverx commented 4 years ago

@hudsonbay Did you solved it?

hudsonbay commented 4 years ago

@hudsonbay Did you solved it?

My mistake. I wanted to disappear/hide this "issue" because it's not an issue. It was a silly mistake of mine.

I was declaring dlex using the version ~>0.1.0 . I don't know how I ended up doing that. When I upgraded to ~> 0.5.1 everything worked again.

I should have said that and then close the issue. My apologies for that. I'd wish to disappear the issue , not close it, because it was not an issue