Skip to content
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

windows: Remove requirement to use cgo #194

Merged
merged 3 commits into from
Sep 21, 2023
Merged

Conversation

deadprogram
Copy link
Member

This PR is an attempt to remove the requirement for CGo when using Windows.

Based entirely on the fine work of @jagobagascon including the hack to get around golang/go#55015

@deadprogram
Copy link
Member Author

@jagobagascon I am able to run the scanner on Windows without installing any CGo build tool with this PR.

It runs the scanner exactly as expected, and does not display any errors. 😄

@deadprogram deadprogram marked this pull request as ready for review September 19, 2023 15:12
@deadprogram
Copy link
Member Author

Seems to be working well enough for me.

@jagobagascon
Copy link
Member

I don't think the error is going to be fixed anytime soon. And let's be real, tinygo-org/bluetooth is probably the only use case for saltosystems/winrt-go so, would you like us to merge saltosystems/winrt-go#60?

If so, I think the PR should also include the "workaround" to avoid the deadlock error. I already made a change to include it: basically whenever a Delegate class is created a Goroutine with a timer is started, and it is automatically stopped when the object is released. That should completely avoid the deadlock error.

@deadprogram
Copy link
Member Author

@jagobagascon tested saltosystems/winrt-go#60 and it worked perfectly. Once it is merged, I will replace the commit in this PR that updates the go.mod by pulling in the updated winrt-go and it should be good to go!

@deadprogram
Copy link
Member Author

Merging since has been pretty well tested.

@deadprogram deadprogram merged commit 195d418 into dev Sep 21, 2023
5 checks passed
@deadprogram deadprogram deleted the windows-without-cgo branch September 21, 2023 10:54
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.

2 participants