go/build: doesn't properly use backslashes on Windows #36861
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
OS-Windows
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I was trying to use operator-sdk on Windows. I know, I know, I'm on Windows...
The operator-sdk generate k8s command was putting files in the wrong place. The reason for this is that, on Windows, the IsLocalImport() function in src/go/build/build.go gets passed a path that looks like this:
whereupon it returns false, because it's looking for forward slashes.
What did you expect to see?
Everything in build.go should probably work on Windows. Right now, I can see a number of other things that won't as well.
IsLocalImport() should presumably just use filepath.IsAbs()?
What did you see instead?
There's code in src/go/build/build.go that is clearly not right for Windows because it relies on pathnames containing slashes where on Windows they're going to contain backslashes instead.
The text was updated successfully, but these errors were encountered: