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.
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
Version parsing rehaul #228
Version parsing rehaul #228
Changes from all commits
0e11616
298a790
307868d
209160f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be a breaking change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if I should call that a "breaking" change, but there's some potential extra information here, normally if a plugin creates their version with core + pre-release, the format should not change at all.
If there's a metadata however, this could change (metadata right now could be defined as
GitCommit
right now already, but it's global)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My concern was if Packer was using this same method and showing
git commit
between parenthesis it could be a breaking change for users checking git commits of builds, but Packer doesn't do that. Could it be a problem for packer plugin maintainers? I could see this happening if someone is using the plugin describe command for some validation or using the method to write user-agent to HTTP calls 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's a good callout, I didn't pay attention that I was changing the format honestly, I thought the commit was added as a metadata to the version if defined. For clarity though, it's not automagic, it needs either to be set by the plugin developers, or as a ldflag. AFAICT we don't set it in the scaffolding, or in any of our plugins.
Also, we use
String
for printing out the version of the plugin fordescribe
. I'm not certain this is used anywhere, but I cannot certify it.That said, I'll do a reroll of this commit to avoid changing the commit format, so it remains complete as it was beforehand.
I'll add a test to make sure it doesn't change between the two versions.