-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Include a directory with Flutter assets #12944
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
Conversation
00b26c2 to
cce3596
Compare
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.
just assert(bytes is Uint8List). If it's ever NOT a Uint8List this is a serious performance concern.
|
cc @tvolkert |
FYI @xster who's been working on a "flutter project upgrade" mechanism. |
tvolkert
left a comment
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.
Once the engine changes land, this should include the engine roll to the appropriate revision.
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.
Not build_dir?
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.
Nope, I am however considering renaming the option to assets-dir when doing the FLX removal cleanup.
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.
Rename sgtm. And the reason we're putting this in derived_dir rather than build_dir is that we need to reference it from project.pbxproj (like the current app.flx, App.framework, etc.), right?
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.
Yes, exactly. Should have added that, sorry.
|
I'm probably still at least a week away from a functioning flutter project upgrade mechanism. How does this PR work with flutter projects created in the past? |
|
Old flutter projects will need to get their |
jakobr-google
left a comment
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
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.
Rename sgtm. And the reason we're putting this in derived_dir rather than build_dir is that we need to reference it from project.pbxproj (like the current app.flx, App.framework, etc.), right?
6801fe7 to
0ef320e
Compare
|
@szakarias What is the status of this PR? |
|
I am waiting for review of the corresponding engine PR flutter/engine#4343. cc @chinmaygarde. |
|
I have added a few more comments to the engine PR. I am still a bit unclear about how we are going to address the following issues:
|
3ce02f4 to
9f9c4fd
Compare
|
Reverted the change in asset retrieval. We still return assets as byte data instead of the asset paths. I am postponing this to a later change. With respect to upgrading existing projects, there is this PR #13011. With respect to having multiple Flutter applications in the same application bundle, I am not sure how hardcoding |
tvolkert
left a comment
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
9f9c4fd to
8e87f35
Compare
|
BTW, this was checked in when the tree was red. Please avoid checking anything in when the tree is red except for attempts to fix the tree, because it makes it much harder to detect, and later identify, additional failures introduced while the previous failure was ongoing. Thanks! |
This reverts commit 3af6b9c.
* Revert "Include a directory with Flutter assets (#12944)" This reverts commit 3af6b9c. * Revert "Upgrade project.pbxproj to include flutter_assets (#13011)" This reverts commit 08128cb. * Revert "Upgrade complex_layout project.pbxproj to include flutter_assets (#13544)" This reverts commit 35f1a04. * mark complex_layout_ios__start_up as flaky
|
Ah, excellent. It's good to leave a message on the PR when that happens so that everyone knows it was intentional. Thanks for the update! |
* Revert "Include a directory with Flutter assets (flutter#12944)" This reverts commit 3af6b9c. * Revert "Upgrade project.pbxproj to include flutter_assets (flutter#13011)" This reverts commit 08128cb. * Revert "Upgrade complex_layout project.pbxproj to include flutter_assets (flutter#13544)" This reverts commit 35f1a04. * mark complex_layout_ios__start_up as flaky
The
flutter_assetsdirectory is meant to eventually replaceapp.flx.This PR also changes the way an asset is retrieved. On asset channel queries, engine now returns the path to the asset instead of returning the asset as byte data.
Before merging this I will have another PR ready which can upgrade the
project.pbxprojfile of existing projects to includeflutter_assets.Engine PR flutter/engine#4343