Pre-alias refactors#3900
Merged
Merged
Conversation
Previously, we had the version both embedded via ldflags into `version.Version` but also passed in to the gen program as a CLI argument. The version should _always_ be embedded during a proper build, but might be missing for when debugging via an IDE. 1. Make everything work without having to pass the version as a CLI argument. 2. Assert that the version is set by exactly one of the CLI argument or the ldflags for consistency. 3. Use the parsed semver.Version object everywhere after initialization. This removes passing the version by CLI completely in the makefile.
Contributor
Does the PR have any schema changes?Looking good! No breaking changes found. |
thomas11
approved these changes
Jan 28, 2025
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3900 +/- ##
==========================================
- Coverage 57.26% 57.21% -0.05%
==========================================
Files 78 78
Lines 12438 12436 -2
==========================================
- Hits 7122 7115 -7
- Misses 4769 4774 +5
Partials 547 547 ☔ View full report in Codecov by Sentry. |
Closed
Contributor
|
This PR has been shipped in release v2.85.0. |
This was referenced Sep 1, 2025
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.
A couple of minor clean-ups pulled out from the alias work:
ldflagsOR CLI arg, but not both.