-
Notifications
You must be signed in to change notification settings - Fork 18k
x/exp/cmd/gorelease: don't suggest a version that already exists #37562
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
Comments
Additionally, |
From #41110:
As you can see, gorelease is fine with a proposed version that is equivalent to an existing version, and a proposed version that is before an existing version. This appears to be fine (tagging earlier versions is acceptable), though here I think that the base version could have been inferred. (IIRC if you pass no args at all, base version is inferred) |
What other versions are available for that module? Currently, if |
Ohhhh. That makes sense. I see that above, both v0.1.0 are v0.0.1 correct. Ok. Mayyyy be worth adding a note like, "Note however that versions are before the current latest version." That might confuse people too, and terse-ness is always nice, but yeah it is initially a bit unexpected. |
Change https://golang.org/cl/288032 mentions this issue: |
I started looking into this today. A question: we have tests like
But, there is already So, here version Does that sound right? Impl note: seems |
Some change to the test framework will be needed to implement this. We copy both base and release versions out of the test proxy. And in the basic module, we simulate the evolution of a module by running gorelease at several different points on its history. Those tests might run gorelease on lower existing versions, but they should act like those versions don't exist. Just some brainstorming. These aren't necessarily good ideas:
|
Two suggestions:
|
Thanks for the thoughts, Jay!
SGTM to both. Looked into the test restructuring. Here are some quick thoughts on the ideas presented:
The proxy dir gets created at TestMain time, and tests get run in parallel, so this is a bit tricky I think.
Figured it's a bummer to create a flag that we'd have to support, just for the sake of a test.
Exploring this idea! Thank you again for these thoughts, it's great to have a mental foundation on which to build ideas!! |
This appears to suffer the same parallel problem as idea #1. So, I went with idea #1 and excluded the parallelism from tests with a Two things I don't love about it:
|
Sorry for the long reply - perf and a few fires. :) After some thought, I'm going to just try to re-write the tests so that they don't collide with this new rule, which allows us to keep our fast concurrent tests. Ex:
|
If we can keep the existing tests (mostly) the same, that would be better. Here's what I'd suggest:
|
These are great ideas. Starting work today on trying this pipe-env-list approach. |
Done: https://go-review.googlesource.com/c/exp/+/288032 Sorry it took so long. |
Fixes golang/go#37562 Change-Id: Ie02cfaa9efc8c8375481540e551ae38f19c3a2e8 Reviewed-on: https://go-review.googlesource.com/c/exp/+/288032 Trust: Jean de Klerk <deklerk@google.com> Run-TryBot: Jean de Klerk <deklerk@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
When
gorelease
is used without the-version
flag, it may suggest a version automatically, derived from the-base
version.If the version that
gorelease
would normally recommend already exists,gorelease
should note this.The text was updated successfully, but these errors were encountered: