Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep code generated from capnp in the git repo #2822

Closed
sustrik opened this issue Jun 28, 2019 · 0 comments · Fixed by #2878
Closed

Keep code generated from capnp in the git repo #2822

sustrik opened this issue Jun 28, 2019 · 0 comments · Fixed by #2878

Comments

@sustrik
Copy link
Contributor

sustrik commented Jun 28, 2019

Most developers prefer to have the code (go/proto/*.capnp.go) directly in the git repo.

However, the linter must be able to detect the case when the source file and the generated file diverged or when the source file was removed.

lukedirtwalker pushed a commit that referenced this issue Jul 24, 2019
* Add generated go/proto files to git
* Add make target make gogen to generate go/proto files
  Generate *.capnp.go and structs.gen.go files in bazel and then copy to source directory in a make target.
  
  For the case of structs.gen.go which is generated with a simple shell script, this setup is somewhat overcomplicated. 
  Generating the *.capnp.go files does use bazel infrastructure to get the capnp tooling.
  To keep things symmetric, both cases are handled the same.

* Add CI check generated go/proto files
  Detect uncommitted changes to generated go/proto files by cleaning and regenerating the files.

Fixes #2822
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant