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

messages: Go generated proto messages not checked in #660

Closed
dixonwille opened this issue Jul 22, 2019 · 2 comments
Closed

messages: Go generated proto messages not checked in #660

dixonwille opened this issue Jul 22, 2019 · 2 comments
Labels
language: go 🔧 build Related to build / release process

Comments

@dixonwille
Copy link

Summary

I think that the generated code from messages.proto should be checked into GitHub so that the go packages can be used in generators being created.

Expected Behavior

I would expect for the latest gherkin parser to be "go gettable".

Current Behavior

Whenever I am trying to run go get github.com/cucumber/cucumber/gherkin/go to get the latest code the following is the output:

go: finding github.com/cucumber/cucumber/gherkin/go latest
go: finding github.com/cucumber/cucumber/cucumber-messages/go/v3 v3.0.0
go: github.com/cucumber/cucumber/cucumber-messages/go/[email protected]: unknown revision cucumber-messages/go/v3.0.0
go: error loading module requirements

Possible Solution

Check the generated files into GitHub. You could have the CI check to see if the files have diverged by running the generator on the CI and then running git diff to see if there are any changes. If so don't allow that code in.

I understand this was done on purpose https://github.com/cucumber/cucumber/blob/master/cucumber-messages/go/v3/.gitignore suggest that. But since Go's "package repository" is GitHub (really any source control system) it needs all the files to be compilable (including generated files).

Steps to Reproduce (for bugs)

  1. Start a new go module. go mod init some/package/path
  2. Run go get github.com/cucumber/cucumber/gherkin/go to add it to the go.mod file

Context & Motivation

I am trying to create a generator that parses the gherkin syntax. https://github.com/cucumber/gherkin-go was updated but if you look at the go.mod file in that repo you will notice that it says the package import is actually in this repository not that. I think consolidating everything down to use gherkin-go is great (#425) but right now, even if I used precompiled binaries to create the proto message binary, I can not unmarshal it into the correct proto message as it is not published.

Your Environment

  • Version used: latest (go mods is using its version of "latest" which usually mean last tagged)
  • Operating System and version: Mac OS 10.14.5
  • Link to your project: Not Public
@aslakhellesoy
Copy link
Contributor

We used to have them checked in actually (for all languages). I agree we should add them back for go.

@aslakhellesoy
Copy link
Contributor

Fixed on master!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language: go 🔧 build Related to build / release process
Projects
None yet
Development

No branches or pull requests

2 participants