-
Notifications
You must be signed in to change notification settings - Fork 68
[ffigen] Large ObjC test #1554
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
[ffigen] Large ObjC test #1554
Conversation
PR HealthChangelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. Coverage ✔️
This check for test coverage is informational (issues shown here will not fail the PR). License Headers ✔️
All source files should start with a license header. Unrelated files missing license headers
Package publish validation ✔️
Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Adds an integration test that runs ffigen on a large ObjC library (WebKit), verifies that the generated bindings pass Dart analysis, and that the ObjC bindings compile.
Due to memory thrashing issues in the analyzer (dart-lang/sdk#56247), I have to limit the size of the bindings for the test to finish in a reasonable amount of time. To avoid the potential bias in selecting which APIs to bind (ie picking the APIs I know work), I'm randomly filtering out 90% of the bindings (interesting use case for ffigen's Dart API 😆). The randomizer uses a fixed seed so that the test is deterministic, but another option would be to randomize the seed (and print it so that we can debug failures).
There's one more bug to fix before all the methods in this library pass analysis (#1220), so for now I'm just filtering out the few methods that don't work.
Fixes #1183