WFransen
Ex_protobuf not parsing proto file
Hello,
Trying to use the exprotobuf library, but get the following error message:
defmodule Messages do
use Protobuf,
from: Path.expand("/home/wannes/Documents/ex_cucumber_message/messages.proto")
# use_package_names: true,
# namespace: :"Elixir"
end
> $ mix compile
Compiling 1 file (.ex)
== Compilation error in file lib/cucumber_messages/messages.ex ==
** (CaseClauseError) no case clause matching: %Protobuf.Field{fnum: 1, name: :name, occurrence: :defaulty, opts: [], rnum: 2, type: :string}
lib/exprotobuf/define_message.ex:147: Protobuf.DefineMessage.define_trivial_typespec_fields/2
lib/exprotobuf/define_message.ex:135: Protobuf.DefineMessage.define_trivial_typespec/1
lib/exprotobuf/define_message.ex:54: Protobuf.DefineMessage.def_message/3
lib/exprotobuf/builder.ex:135: anonymous fn/6 in Protobuf.Builder.generate/2
(elixir 1.10.3) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3
lib/exprotobuf/builder.ex:82: Protobuf.Builder.generate/2
(stdlib 3.13) erl_eval.erl:680: :erl_eval.do_apply/6
(stdlib 3.13) erl_eval.erl:449: :erl_eval.expr/5
I’ve put the code at : GitHub - WannesFransen1994/ex_cucumber_messages · GitHub . The proto file is messages.proto .
Note: The proto file can be parsed with the ahamez/protox library, which appears to be more performant but does require compile-time external dependencies. Hence my slight personal preference to exprotobuf, if it compiles.
Thank you in advance.
Most Liked
hauleth
Just out of the interest - why not use Elixir-native implementations of Gherkin parser and/or full Cucumber-like BDD testing libraries? For example there is mine Watermelon library.
1
Popular in Questions
Hi All,
I set a environment variables in dev.exs , like below code.
when i start server, how can i set the ${enable} value?
thanks.
d...
New
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
The Elixir Typespec docs show the following syntax for keyword lists in typespecs:
# ...
| [key: type] # keyword lists...
New
Hi all,
I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage.
I’m trying to use Postgres...
New
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: )
Hello all, this is ...
New
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
I will often find my self writing things similar to:
case some_value do
nil -> something()
"" -> something()
_ -> somethi...
New
Hi all,
Trying to get some more clarity over utc_datetime and naive_datetime for Ecto:
The documentation above suggests that while ...
New
Credo is smart enough to check for (something like) this:
assert length(the_list) == 0
with this response:
Checking if an enum is empt...
New
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
Other popular topics
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I’m writing a test for one of the...
New
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]
15:22:35.803 [error] gen_event {lager_file_backend...
New
Hello all!
I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
Hi all,
I’ve just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage.
I’m trying to use Postgres...
New
Hi everyone,
One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
lets say i have a sample like
a = 20; b = 10;
if (a > b) do
{:ok, "a"}
end
if (a < b) do
{:ok, b}
end
if (a == b) do
{:ok, "equa...
New
Hey,
Just curious what are the main benefits of Elixir compared to Clojure?
When is Elixir more useful than Clojure and vice versa?
Th...
New
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








