-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Building for Windows fails on MacOS and Linux without additional go get #824
Comments
This was changed in #822 |
Hello @a-h , that is unfortunate that this change broke your build. But I don't think you can expect that a go get ./... can retrieve all needed dependencies for all architectures. I think you workaround is exactly what should be done. What would you like we do to fix that ? |
Thanks, I just thought it worth raising an issue in case there was a simple fix, but also with a workaround for anyone else affected. I expect it’s a low number of people who would be affected. Feel free to close. |
Hello, regarding modules we already have a module definition in logrus. We may add this dependency in it in order to be ready when modules will be widespread. |
konsorten/go-windows-terminal-sequences#1 |
@a-h can you try if the build works for you in module mode ? |
OK, so to test this, I did the following. Installed Go 1.11 on a Mac and started a new project in a directory under the desktop. I deleted the I created a module github.com/a-h/logtest
require github.com/sirupsen/logrus v1.0.6 Then created a simple "Hello World" main.go: package main
import "github.com/sirupsen/logrus"
func main() {
logrus.Println("Hello")
} Next, I ran
module github.com/a-h/logtest
require (
github.com/sirupsen/logrus v1.0.6
golang.org/x/crypto v0.0.0-20180910181607-0e37d006457b // indirect
golang.org/x/sys v0.0.0-20180925112736-b09afc3d579e // indirect
) I noticed that |
@a-h indeed, this dependency was not present in v1.0.6. I've just released v1.1.0, can you try with this one ? |
@dgsb yes, that works fine in module mode. I end up with a
|
With the latest version of logrus, my cross-platform (Linux to Windows) build has stopped working.
Steps to reproduce:
go get ./...
thengo build
- works fine.GOOS=windows go build
Fails with
cannot find package "github.com/konsorten/go-windows-terminal-sequences"
.Steps to workaround:
GOOS=windows go get ./...
then re-run the build to get Go to include the required Windows packages.Possible improvements:
import _ "github.com/konsorten/go-windows-terminal-sequences"
in any file just to bring in the required package. (Doesn't work:build constraints exclude all Go files in /Users/adrian/go/src/github.com/konsorten/go-windows-terminal-sequences
)The text was updated successfully, but these errors were encountered: