Should wire_gen.go be checked into version control? #325
Unanswered
naftulikay
asked this question in
Q&A
Replies: 1 comment
-
I think it's better to check in the generated code since it's a part of the code. Also, there are a few advantages I think:
For CI/CD, if you don't check in the code then you have to install & run Wire in the build step:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Since
wire_gen.go
files are generated and not user-authored, should they be checked-in to version control? They seem to be idempotent, they don't change unless injectors change, but I'm not sure on whether to check them in or not as they are generated artifacts.Additionally, what is the strategy for building a project in CI/CD such as GitHub Actions? Do I need to install the
wire
command in my build environment, or doesgo generate
cover things? I'm going to start testing this out on my own to see what the different possibilities are, but I'd like to hear best practices from developers and users.search tags: git, vcs, version control
Beta Was this translation helpful? Give feedback.
All reactions