Skip to content

Conversation

@szakarias
Copy link
Contributor

@szakarias szakarias commented Nov 9, 2017

The flutter_assets directory is meant to eventually replace app.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.pbxproj file of existing projects to include flutter_assets.

Engine PR flutter/engine#4343

Copy link
Contributor

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.

@szakarias
Copy link
Contributor Author

cc @tvolkert

@tvolkert
Copy link
Contributor

Before merging this I will have another PR ready which can upgrade
the project.pbxproj file of existing projects to include flutter_assets.

FYI @xster who's been working on a "flutter project upgrade" mechanism.

Copy link
Contributor

@tvolkert tvolkert left a 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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not build_dir?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

@xster
Copy link
Member

xster commented Nov 14, 2017

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?

@szakarias
Copy link
Contributor Author

Old flutter projects will need to get their project.pbxproj updated for this to work. The PR for it is here #13011 .

Copy link
Contributor

@jakobr-google jakobr-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

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?

@Hixie
Copy link
Contributor

Hixie commented Nov 22, 2017

@szakarias What is the status of this PR?

@szakarias
Copy link
Contributor Author

I am waiting for review of the corresponding engine PR flutter/engine#4343. cc @chinmaygarde.

@chinmaygarde
Copy link
Member

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:

  • How are the *.pbxproj template upgrades going to be applied to existing users of Flutter? I see no indication about providing upgrade guidance or warning in either the engine or framework patches.
    • My hacky attempt to copy the resources manually in the xcode_backend.sh build invocation to the directory specified in ${TARGET_BUILD_DIR}/${WRAPPER_NAME}/flutter_assets seemed to work. I grabbed those variables from the Xcode build log by clicking the "Show environement variables in build log." checkbox. Maybe we dont need the templates to change.
  • Hardcoding a single directory named flutter_assets means we can't have multiple Flutter applications in the same application bundle.

@szakarias
Copy link
Contributor Author

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 flutter_assets is worse than the already hardcoded app.flx?

Copy link
Contributor

@tvolkert tvolkert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@szakarias szakarias merged commit 3af6b9c into flutter:master Dec 13, 2017
@Hixie
Copy link
Contributor

Hixie commented Dec 13, 2017

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!

yjbanov added a commit to yjbanov/flutter that referenced this pull request Dec 13, 2017
yjbanov added a commit that referenced this pull request Dec 14, 2017
* 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
@mravn-google
Copy link
Contributor

@Hixie Tree was red because of a test we had identified, but not marked, as flaky. It was so marked a little later (#13542).

@Hixie
Copy link
Contributor

Hixie commented Dec 16, 2017

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!

DaveShuckerow pushed a commit to DaveShuckerow/flutter that referenced this pull request May 14, 2018
DaveShuckerow pushed a commit to DaveShuckerow/flutter that referenced this pull request May 14, 2018
* 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
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 12, 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 this pull request may close these issues.

8 participants