Skip to content

Conversation

@tgummerer
Copy link

On Windows DLL loading sometimes fails for spurious reasons. The panic is always in the following form:

syscall.MustLoadDLL(...)
	/opt/hostedtoolcache/go/1.21.1/x64/src/syscall/dll_windows.go:94
github.com/atotto/clipboard.init()
	/home/runner/go/pkg/mod/github.com/atotto/[email protected]/clipboard_windows.go:22 +0x347

This appears to be happening while loading the application, and was a frequent issue in CI tests in github.com/pulumi/pulumi. We can fix this by lazy loading the DLLs instead. We've been using this fix in our go.mod, using a replace statement (see pulumi/pulumi#17410), but would love to get this upstreamed, so we can remove that replace, and hopefully it helps others as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant