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

Add a clean way to use a custom Flutter engine #160

Closed
stuartmorgan opened this issue Nov 30, 2018 · 0 comments · Fixed by #225
Closed

Add a clean way to use a custom Flutter engine #160

stuartmorgan opened this issue Nov 30, 2018 · 0 comments · Fixed by #225
Assignees

Comments

@stuartmorgan
Copy link
Collaborator

Currently the only way to do this is to do a normal build, then replace the library/framework with the locally built version (and remember that your build is no longer actually using the hash that .last_engine_version, and thus the build output, claims). Updating Flutter will stomp the replacement.

And you have to also remember to change
https://github.com/google/flutter-desktop-embedding/blob/master/tools/build_flutter_assets#L26
and undo it when unwinding.

There should be something along the lines of .flutter_location_config that both update_flutter_engine callers and build_flutter_assets will check against that will cause a local build to be copied in and used instead, such that correctly enabling/disabling it is as simple as moving a file. (Or, if we switch to GN, a GN configuration option might work instead.)

@stuartmorgan stuartmorgan self-assigned this Jan 10, 2019
stuartmorgan added a commit that referenced this issue Jan 14, 2019
update_flutter_engine and build_flutter_assets now check for an
engine_override file at the root of the repository to trigger the
use of a local engine. Updates the README to link to instructions
on using it.

Since this adds more logic to build_flutter_assets, it has been
rewritten in Dart.

There are some obvious limitations (e.g., hard-coded name/location
requirement, copying every time instead of only when the
local build has changed), which can be addressed in the future if
there's sufficient demand. Since it is only intended for temporary use
when debugging, or testing engine changes, this may be sufficient,
and is a significant improvement over managing it manually.

Unlike .flutter_location_config this has no leading ., and is in the
repository rather than above it. This difference is intentional,
since unlike .flutter_location_config this is for temporary use,
so having it show up in directory listings and git status is
helpful as a reminder that it is enabled.

Fixes #160
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant