make-files / makefiles

A library of opinionated Makefiles for popular programming languages.
https://makefiles.dev
MIT License
4 stars 5 forks source link

Ignore symlinked protobuf files #114

Closed ezzatron closed 1 year ago

ezzatron commented 1 year ago

We ran into an issue where symlinked copies of protobuf files were being included in GENERATED_FILES in a way that caused the go package to explode. The symlinked copies of the .proto files are used by an IDE that does its own generation, and were not intended to generate additional Go code.

This is a hacky fix to get us past the issue, but the protobuf and/or go packages probably need a way to either explicitly allow or explicitly disallow certain .proto files from having Go code generated for them.

jmalloc commented 1 year ago

This is a hacky fix to get us past the issue, but the protobuf and/or go packages probably need a way to either explicitly allow or explicitly disallow certain .proto files from having Go code generated for them.

Maybe we could look for the presence/absence of the go_package option? There's precedent for looking inside .proto files to detect whether or not they define a service.

ezzatron commented 1 year ago

Maybe we could look for the presence/absence of the go_package option? There's precedent for looking inside .proto files to detect whether or not they define a service.

Unfortunately the .proto file will still contain go_package, since it's a symlinked copy of the same file. You should probably try the repro in #115 cause there's other weird stuff going on.