You haven’t shown any commands you run or output from those commands, so I have no idea what you’re doing or what problem you’re experiencing. Be more explicit.
//go:generate go run generate.go lib/protocol lib/config lib/fs lib/db lib/discover
2022/06/07 21:37:07 lib/protocol returned: [lib/protocol/bep.proto
lib/protocol/deviceid_test.proto]
repos/protobuf/gogoproto/gogo.proto: File not found.
lib/protocol/bep.proto:6:1: Import "repos/protobuf/gogoproto/gogo.proto" was not found or had errors.
lib/protocol/bep.proto:5:1: warning: Import ext.proto but not used.
2022/06/07 21:37:07 Failed generatinglib/protocol
exit status 1
generate.go:27: running "go": exit status 1
That code is a bit obsolete, we could now instead use go list -m -f {{.Dir}} github.com/gogo/protobuf to get the path to the module, which already has the right version and is downloaded.
Actually I have another question, that is I want to change the .stignore file location. Why would I want to do this because I don’t want the sync files to be in a folder with the .stignore file. I’m not very familiar with syncthing code, just watching the stage. I would like to know if you can put the .stignore file in the specified location?
The filename and location of .stignore are currently hard-coded. You can find it easily if you search through the files in the Syncthing repository for “stignore”. Changing the name to something else would be trivial, but moving the file to a completely different location (e.g. outside the Syncthing folder) probably not so much.
Although, I think you could possibly hack the path to place the file inside .stfolder or something for your personal use (without considering backward compatibility, migration from older versions, and the fact that .stfolder itself is configurable and can be a file or even non-existent instead of always being a folder).