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
Reland "Native assets support for Linux" #135097
Conversation
The context does not contain a config in g3 when doing expression evaluation. This workaround prevents expression evaluation from crashing in g3.
This enables skipping building native assets with `build.dart` in g3 where native assets are built bazel instead.
The first commit is the revert of the revert. The third commit reverts the second commit (which was a workaround), and contains the fix for b/301051367 together with cl/567233346. |
Somehow, the 100something CI checks aren't triggering? |
@dcharkes Is it intended to merge into |
Aren't these aliases of each other? |
I don't fully understand the specifics on how the targets are generated yet, but it seems that the logic in our backend that determines which targets to run handles PRs merging to the "default" branch (master in this case) to PRs merging to other branches. |
Nice find, it looks like the CI is now running :) Should I be using |
Yeah I think that would prevent this from occurring. I believe there are some github issues created to completely get rid of |
I exclusively branch from |
Friendly ping to review this PR @chingjun @stuartmorgan. (Apparently, all my PRs end up having merge conflicts with g3, and get "deleted" roll CLs. I've verified the fix for this PR in g3 cl/566871401. So it should be safe to set g3 to green. Though, other stuff might have landed in the meantime, invalidating the old CL.) |
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! The approach is a lot cleaner than I originally imagined :)
And for the g3fix, I think you only need to keep the first file in your g3fix CL, maybe that was the issue you're facing?
Reland of flutter#134031. (Reverted in flutter#135069.) Contains the fix for b/301051367 together with cl/567233346. Support for FFI calls with `@Native external` functions through Native assets on Linux. This enables bundling native code without any build-system boilerplate code. For more info see: * flutter#129757 ### Implementation details for Linux. Mainly follows the design of flutter#130494. Some differences are: * Linux does not support cross compiling or compiling for multiple architectures, so this has not been implemented. * Linux has no add2app. The assets copying is done in the install-phase of the CMake build of a flutter app. CMake requires the native assets folder to exist, so we create it also when the feature is disabled or there are no assets. ### Tests This PR adds new tests to cover the various use cases. * packages/flutter_tools/test/general.shard/linux/native_assets_test.dart * Unit tests the Linux-specific part of building native assets. It also extends various existing tests: * packages/flutter_tools/test/integration.shard/native_assets_test.dart * Runs (incl hot reload/hot restart), builds, builds frameworks for Linux and flutter-tester.
Reland of #134031. (Reverted in #135069.) Contains the fix for b/301051367 together with cl/567233346.
Support for FFI calls with
@Native external
functions through Native assets on Linux. This enables bundling native code without any build-system boilerplate code.For more info see:
Implementation details for Linux.
Mainly follows the design of #130494.
Some differences are:
The assets copying is done in the install-phase of the CMake build of a flutter app.
CMake requires the native assets folder to exist, so we create it also when the feature is disabled or there are no assets.
Tests
This PR adds new tests to cover the various use cases.
It also extends various existing tests:
Pre-launch Checklist
///
).