-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fix invalid dependencies #605
Conversation
I don't know why some vendors have been deleted. |
Strangely, the vendored dependencies are not the same if I'm using Go 1.13beta or 1.12.x. |
Is someone available to review this PR ? |
I am also experiencing this issue |
Yes would be great if this could indeed be merged and a FWIW. There are 2 other PRs (#583, #614) that address the same issue but I think this is the one that should be merged given it's the only one that actually updates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this PR, i now get
$ env GOPROXY=direct GO111MODULE=on go build
go: github.com/golangci/errcheck@v0.0.0-20181003203344-ef45e06d44b6: invalid pseudo-version: does not match version-control timestamp (2018-12-23T08:41:20Z)
@dajohi which version of Go are you using ? |
@pierrre, the version check is performed when downloading the module from version control. If an invalid version is already present in your module cache, it will continue to be available to builds using that cache. To test this change, you'll probably want to start from a clean module cache (either run |
Hi, sorry for the delay. |
The build doesn't pass, but I don't understand the error. |
It seems that |
EDIT: also ran it on your branch and no diff. CI seems to agree with me as well. |
there is no diff on my computer |
Yes. Apologies. Edited my message above as well after I tested your branch myself. 👍 Having a look if I can figure out what's going on. |
Ah got it, although not the root cause. You can regenerate the file locally by running: make -B docs/demo.svg The My guess: given this relies on |
I'm sorry, but my PR is only about broken Go modules dependencies. |
I'll have a look if I can make a sensible PR to fix it separately. 👍 |
Any update from maintainer? |
No. The maintainer has been inactive for 6 weeks now and there's no news available at the moment. See #647. |
@@ -1,11 +1,13 @@ | |||
module github.com/golangci/golangci-lint | |||
|
|||
go 1.11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this PR specify go 1.11
? I actively don't want this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain what issue this raises for you?
This statement is not a hard requirement. It's merely an indication used by the go
toolchain and you should not need to worry about it.
Tl;dr: This tells the Go compiler that if the build fails and you are using a < 1.11 version it will tell you it might be due to a too old Go version... however given that versions < 1.11 are not module aware they will not even bother / know how to interpret this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference see the Go 1.12 release notes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that this specifier causes the files in the module to be built with an older version of Go?
As mentioned here: https://golang.org/doc/go1.12#modules
The go directive in a go.mod file now indicates the version of the language used by the files within that module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's actually a bit different.
the version of the language used by the files within that module
refers to the version for which the code was written (as it might be using a new function introduced in that version... but not necessarily), not the one with which the files should be built. As the sentence following the one you quote indicates:
If the go directive for a module specifies a version newer than the toolchain in use, the go command will attempt to build the packages regardless, and will note the mismatch only if that build fails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still feel that the writing is a bit ambiguous here, but I think I see what you're saying. I don't object if it's true that it's only a guideline. I just don't want tools like this to force-build on an old version, if that won't happen, I retract my objection :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You will always have full control over your build process. There is no version enforcement going, I can guarantee you that. 🙂
I'll forward the point about the feeling of ambiguity around the phrasing. I can imagine myself in your place and understand it can introduce confusion for people not familiar with the relatively new syntax of go.mod
files.
Guys sorry for the slow response. @pierrre thank you for the fix. I've merged it. |
Thank you ! |
Microsoft Windows [Version 6.2.9200] C:\Users\diovann>cd c:\go-work\HOME\core\ c:\go-work\HOME\core>go build c:\go-work\HOME\core> how to fix this error?? |
@diovann you need to upgrade your dependency on |
how to upgrade golangci-lint to v1.18.0 ?? |
It depends.
NB: If it's someone else's project you can still do 2. but you will need to raise a pull request against the project in question, or you need to file an issue with the project for the maintainers to upgrade their dependency. |
@Helcaraxan thanks for this bro. !! |
Some dependencies have invalid date.
Fixes #581 #595