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

Fix go-generate calling, do more before running tests #1377

Merged
merged 3 commits into from
Nov 1, 2024

Conversation

Groxx
Copy link
Member

@Groxx Groxx commented Nov 1, 2024

Does a couple things:

  • make $(BUILD)/generate now infers files that might affect generation. This should work as long as we keep simple codegen (the server has moved beyond this, sadly).
  • make generate now forces re-generation regardless of need, because it's a nice workaround for dependency issues like happened in [internal] Improve code coverage of internal_task_pollers.go #1373
  • make test and related targets now go-generate and fmt before running tests. Slower, but you can't forget to re-generate, and they're slow already so it's probably fine.

Does a couple things:
- `make generate` now infers files that might affect generation.  This should work as long as we keep simple codegen (the server has moved beyond this, sadly).
- `make generate` now forces re-generation regardless of need, because it's a nice workaround for dependency issues like happened in cadence-workflow#1373
- `make test` and related targets now go-generate and fmt before running tests.  Slower, but you can't forget to re-generate, and they're slow already so it's probably fine.
@@ -27,6 +27,8 @@ import (
"go.uber.org/cadence/internal/common/util"
)

//go:generate mockery --name Value --output ../mocks --boilerplate-file ../LICENSE
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I moved these so they're in the file with the thing they define (so the dependency setup is trivial), and because it's simpler: no need to specify the internal-package bit.

code generation after this is identical.

@Groxx Groxx merged commit 41c2a12 into cadence-workflow:master Nov 1, 2024
10 of 12 checks passed
@Groxx Groxx deleted the generate_better branch November 1, 2024 20:12
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 this pull request may close these issues.

2 participants