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

dev: generate go does not pull all generated files back into the repo #76276

Closed
ajwerner opened this issue Feb 9, 2022 · 5 comments
Closed
Labels
A-build-system C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-dev-inf

Comments

@ajwerner
Copy link
Contributor

ajwerner commented Feb 9, 2022

Describe the problem

I noticed this with a mockgen target, but it appears, IIUC, that we pull very few files back from the sandbox in dev generate go. It appears that we only pull files as described here:

//pkg/roachpb:gen-batch-generated|batch_generated-gen.go|batch_generated.go
//pkg/sql/opt/optgen/lang:gen-expr|expr-gen.og.go|expr.og.go
//pkg/sql/opt/optgen/lang:gen-operator|operator-gen.og.go|operator.og.go

This is far less than ideal. If we're to replace the makefile and go generate more broadly, we need to be able to reliably pull every generated artifact we rely on back into the repo.

Solution

Let's make targets like the protobuf targets to hoist all the generated code.

Epic CRDB-8036

@ajwerner ajwerner added the C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. label Feb 9, 2022
@rickystewart
Copy link
Collaborator

Hmm, this was definitely working at some point but it may have regressed. We don't have any stuff in CI to make sure there are no regressions.

@rickystewart
Copy link
Collaborator

I ran dev build short --debug and indeed we are pulling out not just those few files but a ton of stuff including .pb.go, .eg.go, etc. files. Are you seeing different behavior on your end?

@ajwerner
Copy link
Contributor Author

ajwerner commented Feb 9, 2022

I ran dev generate go and didn't see them pulled. I'll try again in a bit.

@rickystewart
Copy link
Collaborator

Is this bug stale now?

@ajwerner
Copy link
Contributor Author

Yes, I think this is stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-build-system C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. T-dev-inf
Projects
None yet
Development

No branches or pull requests

2 participants