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

Fixed buggy weaver version output. #399

Merged
merged 1 commit into from
Jun 23, 2023
Merged

Fixed buggy weaver version output. #399

merged 1 commit into from
Jun 23, 2023

Conversation

mwhittaker
Copy link
Member

weaver version is supposed to print out the weaver module version, something like:

$ weaver version
weaver v0.15.0

Previously, we used runtime.ReadBuildInfo to read the version of the main module. However, I realized that this version was always the string (devel). At first, I thought the version was (devel) when on a non-tagged commit, but later realized that it is literally always (devel): golang/go#29228.

I did some Googling to figure out how to print out the current module version, but it seems impossible? This PR gives up and sticks with showing the git commit. It's not as clear, but you can look up the commit in the repo history to find the module version.

@spetrovic77, I think this discovery might mean that ServiceWeaver/weaver-gke#68 is a little buggy?

@mwhittaker mwhittaker added bug Something isn't working tool Changes to the weaver tool labels Jun 15, 2023
@mwhittaker mwhittaker self-assigned this Jun 15, 2023
@mwhittaker mwhittaker requested a review from rgrandl June 23, 2023 18:12
`weaver version` is supposed to print out the weaver module version,
something like:

```
$ weaver version
weaver v0.15.0
```

Previously, we used [`runtime.ReadBuildInfo`][ReadBuildInfo] to read the
version of the main module. However, I realized that this version was
always the string `(devel)`. At first, I thought the version was
`(devel)` when on a non-tagged commit, but later realized that it is
literally always `(devel)`: golang/go#29228.

I did some Googling to figure out how to print out the current module
version, but it seems impossible? This PR gives up and sticks with
showing the git commit. It's not as clear, but you can look up the
commit in the repo history to find the module version.

[ReadBuildInfo]: https://pkg.go.dev/runtime/debug#ReadBuildInfo
@mwhittaker mwhittaker merged commit 99a2cf7 into main Jun 23, 2023
7 checks passed
@mwhittaker mwhittaker deleted the devel_bug branch June 23, 2023 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tool Changes to the weaver tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants