-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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_codelab
: Add step_07
#1201
Conversation
PTAL @maks Btw, you'll be amused to learn that the Duktape integration is breaking on Windows. I'm pretty certain I had it working, but I've got no idea how I broke it. Sigh. |
Looks great @domesticmouse ! Builds and runs fine on Ubuntu for me: And looking at the last CI run looks like you solved the windows issue? One small thing is that I think |
Nah, I haven't added tests. 😝 |
@maks added a test and I have no idea how to make the test code load the library. Any ideas? |
@domesticmouse Hmm good question! I have an idea, let me have a quick go to see if it will work... |
@domesticmouse ok I got a quick unit test working here for me: maks@569fb6d using the tip from dart-archive/ffi#39 (comment) My quick hack is only for Linux so it will need to be generalised for the diff paths if you want to test on all OS's. I'm also not sure why it doesn't seem to work for widget tests, but maybe for widget tests it would be better to not use the real native lib, ie. to have a riverpod provider for the native lib and then in the widgettests use a providerscope override to supply a fake provider? |
Thank you @maks 🤓
For this codelab, testing the FFI is the point 😎 |
Yes of course, sorry testing with the plugin in a Flutter widget test is the important part! 👍🏻 |
Inspecting the generated DLL files with DLL Export Viewer, I'm seeing the DLL generated in Step 3 has appropriate exported entry points, yet the one in step 5 has nothing exported. I have vague recollections that windows requires something specific to export DLL entries? |
Status summary:
|
@godofredoc Any ideas on how I can integrate the appropriate GitHub actions to install the required tooling to make compiling the Flutter linux app work? |
sorry to butt in here @domesticmouse but could you perhaps add a script step that does |
Good call, that worked |
PTAL @RedBrogdon I need to land this to complete the codelab write up. |
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. Is there anything we need to do with the Duktape license other than make sure it's included?
Duktape is MIT licensed (https://github.com/svaarala/duktape/blob/master/LICENSE.txt). Should we add a licenses section to the App UI? |
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-devrel channel on Discord.