-
Notifications
You must be signed in to change notification settings - Fork 911
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
cgo: refactor #2774
cgo: refactor #2774
Conversation
This is a large refactor of the cgo package. It should fix a number of smaller problems and be a bit more strict (like upstream CGo): it for example requires every Go file in a package to include the header files it needs instead of piggybacking on imports in earlier files. The main benefit is that it should be a bit more maintainable and easier to add new features in the future (like static functions). This breaks the tinygo.org/x/bluetooth package, which should be updated before this change lands.
For details, see: tinygo-org/tinygo#2774
This PR changes the internal structure of the cgo package:
|
For details, see: tinygo-org/tinygo#2774
💯 |
You do not exaggerate. I am still digesting it, but so far I like what I see. |
I suspect a change may be needed for https://github.com/tinygo-org/tinyfs |
Didn't test it, but yes there's a good chance that package needs an update. |
Seems like tinyfs is still working as expected even with this refactor. I think we should merge unless for some reason we want to hold until after next release. |
Let's merge this now. Thanks @aykevl for the good work! |
This is a large refactor of the cgo package. It should fix a number of smaller problems and be a bit more strict (like upstream CGo): it for example requires every Go file in a package to include the header files it needs instead of piggybacking on imports in earlier files.
The main benefit is that it should be a bit more maintainable and easier to add new features in the future (like static functions).
This breaks the tinygo.org/x/bluetooth package (tinygo-org/bluetooth#97), which should be updated before this change lands.