You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# pwd
/root/src/golang.org/x/exp/shiny/driver/windriver
# git diff
# GOOS=windows go install
# GOOS=windows go generate
# git diff
diff --git a/shiny/driver/windriver/zsyscall_windows.go b/shiny/driver/windriver/zsyscall_windows.go
index 7a70f4f..2b2aa95 100644
--- a/shiny/driver/windriver/zsyscall_windows.go
+++ b/shiny/driver/windriver/zsyscall_windows.go
@@ -4,7 +4,6 @@ package windriver
import "unsafe"
import "syscall"
-import "golang.org/x/exp/shiny/driver/internal/win32"
var _ unsafe.Pointer
# GOOS=windows go install
# golang.org/x/exp/shiny/driver/windriver
./zsyscall_windows.go:39: undefined: win32 in win32.HDC
./zsyscall_windows.go:41: undefined: win32
./zsyscall_windows.go:52: undefined: win32 in win32.HDC
./zsyscall_windows.go:64: undefined: win32 in win32.HDC
./zsyscall_windows.go:77: undefined: win32 in win32.HDC
./zsyscall_windows.go:89: undefined: win32 in win32.HDC
./zsyscall_windows.go:115: undefined: win32 in win32.HDC
./zsyscall_windows.go:41: too many errors
#
This issue was introduced in CL 17676. @crawshaw must have changed zsyscall_windows.go by hand, and I didn't reilized that during review.
We can just change all win32.HDC in zsyscall_windows.go (and, probably, in exp/shiny/driver/internal/win32/zsyscall_windows.go) into syscall.Handle.
Alternatively we can teach $GOROOT/src/syscall/mksyscall_windows.go to include 'import "golang.org/x/exp/shiny/driver/internal/win32"'. But that means some sort of new convention here. mksyscall_windows.go would have to be able to resolve win32 into golang.org/x/exp/shiny/driver/internal/win32. Maybe it can deduce this by looking at imports in syscall_windows.go. But current syscall_windows.go does not import golang.org/x/exp/shiny/driver/internal/win32, so we would have to change that. I am not convinced it is a good approach.
Sorry, I recall thinking I should resolve this before sending out the win32 CLs, but then it slipped my mind.
While I think it's a bit sad to lose the HDC type, I'm not up for any further changes to mksyscall_windows.go, and maintaining a fork sounds not fun at all. So reverting to syscall.Handle is fine by me as the least bad option..
Steps to reproduce the problem
This issue was introduced in CL 17676. @crawshaw must have changed zsyscall_windows.go by hand, and I didn't reilized that during review.
We can just change all win32.HDC in zsyscall_windows.go (and, probably, in exp/shiny/driver/internal/win32/zsyscall_windows.go) into syscall.Handle.
Alternatively we can teach $GOROOT/src/syscall/mksyscall_windows.go to include 'import "golang.org/x/exp/shiny/driver/internal/win32"'. But that means some sort of new convention here. mksyscall_windows.go would have to be able to resolve win32 into golang.org/x/exp/shiny/driver/internal/win32. Maybe it can deduce this by looking at imports in syscall_windows.go. But current syscall_windows.go does not import golang.org/x/exp/shiny/driver/internal/win32, so we would have to change that. I am not convinced it is a good approach.
Maybe do something different.
What do you think, David?
/cc @crawshaw for comments
Alex
The text was updated successfully, but these errors were encountered: