-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Windows: Diff fails with cgo: "day out of range" #4867
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
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
Hello, you checked:
can you give the output of |
Oh, sorry about that; I missed the output.
(That was the end of the output. It returned success.) FWIW:
|
Technically the problem is related to the fact the day 0 of January doesn't exist. Internally, the diff is produced based on real files (temp files), so there is a real date. |
Are you using a real machine? Is the system date working on this machine? 🤔 I think you have a problem somewhere else because it's just a call to The call to Can you call I think the |
Yes, I am on a real physical machine with working time (note that the If I uninstall
Note that PowerShell aliases are like bash aliases: they are not real files, so Digging into this more, though, I think it might just be my Sorry for the distraction, it's all my fault! |
Welcome
typecheck
section of the FAQ.Description of the problem
On Windows, running
goimports
on a file using cgo (i.e.import "C"
) produces an error because the time in the diff is zero ("1900-01-00 00:00:00 +0000"
).Note that the same code works fine on macOS (using Apple diff) and Linux (diff (GNU diffutils) 3.6, WSL on the same machine).
Code that does not use cgo appear to work fine on Windows as well.
Version of golangci-lint
golangci-lint.exe --version
diff.exe --version
diff.exe --help
Configuration
golangci-lint.exe --verbose run --no-config --disable-all --enable=goimports .
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
https://github.com/mook-as/junk/tree/ad9838066794145336d89b4f8e549216022d0883
It's a very tiny program that uses cgo.
Validation
Supporter
The text was updated successfully, but these errors were encountered: