fix: Add internal/generated/imports.go for vendoring of generated sources#1286
Open
jeffmahoney wants to merge 1 commit intodmacvicar:mainfrom
Open
fix: Add internal/generated/imports.go for vendoring of generated sources#1286jeffmahoney wants to merge 1 commit intodmacvicar:mainfrom
jeffmahoney wants to merge 1 commit intodmacvicar:mainfrom
Conversation
…rces The move to using generated schemas meant that 'go mod vendor' didn't see the imports in the generated code. This commit adds an otherwise empty imports.go that contains the imports so offline builds can continue to work. It's hidden behind a //go:build imports so there's no impact at build or runtime.
46f187e to
c02325d
Compare
Owner
|
Hi Jeff. I imagine this is in the context of packaging. I don't like much the idea of having to maintain a file with imports only for this reason. Have you thought avout vendoring internal/codegen, runing the generator and then vendoring again? |
Author
|
I have but OBS doesn’t support automating that kind of workflow. I went this route because I got the impression that the list of imports wouldn’t change much over time and wouldn’t impose a meaningful maintenance burden. IMO, if it’s not maintained by the project, it won’t break regular builds. If changes are made that break OBS builds, whomever notices can submit a new PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The move to using generated schemas meant that 'go vendor' didn't see the imports in the generated code. This commit adds an otherwise empty imports.go that contains the imports so offline builds can continue to work. It's hidden behind a //go:build imports so there's no impact at build or runtime.