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

go: use internal version string #649

Merged
merged 2 commits into from
Oct 13, 2022
Merged

Conversation

james-rms
Copy link
Collaborator

@james-rms james-rms commented Oct 11, 2022

Public-Facing Changes

None.

Description
With context from golang/go#29228, the result of runtime/debug.BuildInfo.Main.Version is not well defined. Here we use an internally-defined Version as our library version in all contexts. We also add a test when using a go library release tag go/mcap/v1.2.3 that the Version string is correct.

This PR also changes the behaviour of Writer to only append the existing library version if it's different from the current version. This removes the awkward behaviour of mcap filter where the resulting mcap Library would be mcap go #(devel); mcap go #(devel); mcap go #(devel)....

Fixes #591

@james-rms james-rms force-pushed the jrms/cli-fix-library-string branch 8 times, most recently from a0acde5 to dc29fed Compare October 12, 2022 00:26
@james-rms james-rms changed the title CLI: use build-arg specified version value always go: use internal version string Oct 12, 2022
go/cli/check-tag/go.mod Outdated Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
go/cli/check-tag/main.go Outdated Show resolved Hide resolved
go/cli/mcap/cmd/version.go Show resolved Hide resolved
Copy link
Member

@jtbandes jtbandes left a comment

Choose a reason for hiding this comment

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

So when this CI step fails, how will we notice? Just a red X on the latest commit on main? (It's not blocking any PRs right?)

go/check_tag.sh Show resolved Hide resolved
@james-rms
Copy link
Collaborator Author

Yes, that's about the best we can do I think.

@james-rms james-rms merged commit 7425b07 into main Oct 13, 2022
@james-rms james-rms deleted the jrms/cli-fix-library-string branch October 13, 2022 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Homebrew version of mcap records a strange library string
2 participants