tiziano88 / elm-protobuf

protobuf plugin for elm
https://package.elm-lang.org/packages/tiziano88/elm-protobuf/latest/
MIT License
94 stars 28 forks source link

Add a "excludeFile" option #21

Open cdevienne opened 5 years ago

cdevienne commented 5 years ago

Solve the case were a proto2 file is in the dependencies and we cannot remove it (and is a less-invasive solution than #19)

Example:

protoc "--elm_out=excludeFile=google/protobuf/descriptor.proto:."

cdevienne commented 5 years ago

@tiziano88 Do you consider merging this PR?

cdevienne commented 5 years ago

@tiziano88 Sorry for poking again, but I would like to know if you intend to merge this PR.

(btw I suggest you close the PR you do not intend to merge).

tiziano88 commented 5 years ago

I am not particularly enthusiastic about the proposed approach, but I do think we should solve the underlying issue; I think that implementing some basic support for proto2 would actually not be too much more work, and would also be useful for people who for some reason or another are stuck with proto2. WDYT?

cdevienne commented 5 years ago

The solution is not ideal but it is by far the simplest one solving the issue. I think it is reasonable to use it until we have a better one (which is what I do for my project).

Basic support for proto2 could be useful indeed, but only with Bytes encoding as there is no official json mapping for proto2.

Also, implementing such a feature should be done if there is actually a clearly identified need: in my case I do not need proto2 message support.

My 2 cents ^^