Skip to content
This repository was archived by the owner on Mar 23, 2021. It is now read-only.

Cached binaries should be invalidated on Go version changes #90

Open
stk0vrfl0w opened this issue Oct 28, 2019 · 4 comments
Open

Cached binaries should be invalidated on Go version changes #90

stk0vrfl0w opened this issue Oct 28, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@stk0vrfl0w
Copy link

The gobin cache for a given binary isn't invalidated when the version of Go has changed. In practice, this leads to issues when the compilation behavior differs.

As a concrete example, module builds of swagger-go @ 0.20.1 with go 1.12 results in a perfectly fine working binary whereas go 1.13 creates a binary that throws stack traces when trying to generate models. Due to gobin's current caching behavior, one may be lead to falsely believe that the go 1.13 toolchain works fine for building the 0.20.1 version of swagger-go.

@myitcv
Copy link
Owner

myitcv commented Oct 28, 2019

Please can you confirm the version of gobin you are using?

@stk0vrfl0w
Copy link
Author

I'm installing via "go get", which should be the latest commit: f2461c8

@myitcv
Copy link
Owner

myitcv commented Oct 29, 2019

I'm minded to agree with your suggestion here. Indeed I'm somewhat surprised we didn't do this to start with.

gobin needs a bit of a rewrite and so I'll bundle this up that work.

@myitcv myitcv added the bug Something isn't working label Oct 29, 2019
@vk-outreach
Copy link

vk-outreach commented Jun 28, 2020

I just ran into this issue as well. I suspect a simple fix here is to just change the gobinCache location to include runtime.Version() in its path (or alternatively use the version reported by go version). If that is an acceptable fix, I can probably send a PR..

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants