Closed rpihlak closed 7 years ago
I'll take a look!
This is fixed in master, I'll push a new release today
I seem to still be running into this issue using 1.2.8 (or I'm just doing something horribly obvious wrong).
"exprotobuf": {:git, "https://github.com/bitwalker/exprotobuf.git", "fc6159d7f6a0b85930b2060d93be6fe3edf25fd9", [tag: "1.2.8"]}
defmodule MessageTest do
use Protobuf, from: ["priv/protos/message.proto"], inject: true
end
iex(1)> MessageTest.__info__(:functions)
[defs: 0]
defmodule MessageTest do
use Protobuf, from: ["priv/protos/message.proto"], inject: true, only: :Message
end
iex(1)> MessageTest.__info__(:functions)
[__struct__: 0, __struct__: 1, decode: 1, decode_delimited: 1, defs: 0, defs: 2,
defs: 3, encode: 1, encode_delimited: 1, new: 0, new: 1, record: 0, syntax: 0]
If there's anymore info I can provide here that would be helpful, or anything else I can do, please let me know!
I wrote a .proto file containing a single message:
I tried to inject this definition into a module as shown in README.md:
Creating the message fails:
However, it started to work after after adding
only
option:Creating the message succeeds: