-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Change current dir for go get swagger so it doesn't modify go.mod #8078
Conversation
I am a bit confused about the issue. If the we already specify the exact version of go-swagger, wouldn't it just update the |
You have a point, but we're not using a binary release from go-swagger. It may be pointing to |
See #8079 for an explanation of why current behavior causes these type of problems and should get a proper fix going forward |
@guillep2k That sounds like a headache if a dependency could potentially have their dependencies inconstant even if the semantic version has been specified. I expected that the MVS rules of Go modules do not work that way. |
@typeless You are right again. @mrsdizzie explained it better in #8079. |
Co-Authored-By: Lauris BH <lauris@nix.lv>
Co-Authored-By: Lauris BH <lauris@nix.lv>
We just need go-swagger as a command line tool but not depends that on gitea runtime. |
Codecov Report
@@ Coverage Diff @@
## master #8078 +/- ##
==========================================
- Coverage 41.78% 41.76% -0.02%
==========================================
Files 481 481
Lines 64425 64425
==========================================
- Hits 26919 26910 -9
- Misses 34036 34046 +10
+ Partials 3470 3469 -1
Continue to review full report at Codecov.
|
Closing in favor of #8087 |
This PR fixes the CI vendor problem by keeping
go get
from changinggo.mod
every time it downloads swagger. In a long conversation with @mrsdizzie and @techknowlogick it was established that this seems to be the culprit of the latest unintended vendor changes:That produces changes in gitea's
go.mod
every time a new version of a golang library is released.To work around that problem I've come with this solution, which is not perfect but could work until a better one comes up.
It works by executing
$(GO) get
outside gitea's directory, so it won't see/modifygo.mod
.