问题描述
我有一个应用需要 diplomat Elixir package 和 grpc Elixir package,但是一旦我将它们添加到(nextLong()
file) 依赖项在执行 mix.exs
命令时返回以下错误
mix deps.compile
如果我对任一依赖项发表评论,那么在执行 warning: redefining module Protobuf.Encoder (current version loaded from /Users/username/all/blockers/protobuf-error/request-handler/_build/dev/lib/exprotobuf/ebin/Elixir.Protobuf.Encoder.beam)
lib/protobuf/encoder.ex:1
== Compilation error in file lib/google/compiler/plugin.pb.ex ==
** (CaseClauseError) no case clause matching: %{Syntax: :proto2}
expanding macro: Protobuf.__using__/1
lib/google/compiler/plugin.pb.ex:3: Google.Protobuf.Compiler.Version (module)
(elixir 1.11.2) expanding macro: Kernel.use/2
lib/google/compiler/plugin.pb.ex:3: Google.Protobuf.Compiler.Version (module)
Could not compile dependency :protobuf,"mix compile" Failed. You can recompile this dependency with "mix deps.compile protobuf",update it with "mix deps.update protobuf" or clean it with "mix deps.clean protobuf".
命令时我会得到完全相同的错误。
版本详情::
- 长生不老药:1.5
- Erlang:Erlang/OTP 18
- Protobuf:最新 (0.7.1)
- GRPC:最新(来自 repo)
- 外交官:0.2
目前的分析:
Diplomat 库需要 exprotobuf 作为其内部依赖项,而 GRPC 需要基本的 google-protobuf,这在应用程序中存在冲突。
任何帮助将不胜感激,谢谢。
[编辑]:
mix sobelow --config
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)