如何解决(CaseClauseError) 没有 case 子句匹配:%{syntax::proto2}
我有一个应用需要 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 举报,一经查实,本站将立刻删除。