-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[flutter_tools] Deferred components: Encode base module loading units in manifest metadata #78079
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
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
| if (storedMappingString != encodedMapping) { | ||
| metaData.setAttribute('android:value', encodedMapping); | ||
| modified = true; | ||
| for (final XmlElement application in document.findAllElements('application')) { |
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.
This ensures that it only looks for metadata element under 'application', not any other element.
| android:value="2" /> | ||
| </application> | ||
| </manifest> | ||
| ''', flush: true, mode: FileMode.append); |
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.
nit: don't append to an empty file (also don't need to flush)
| ); | ||
| final Directory baseModuleDir = env.projectDir.childDirectory('android').childDirectory('app'); | ||
| final File manifest = baseModuleDir.childDirectory('src').childDirectory('main').childFile('AndroidManifest.xml'); | ||
| if (manifest.existsSync()) { |
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.
Since the memory file system is created once for each test you shouldn't need to do this
| validator.displayResults(); | ||
| validator.attemptToolExit(); | ||
|
|
||
| expect(logger.statusText.contains('Modified android files:\n'), true); |
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.
here and elsewhere, this will give better test errors:
| expect(logger.statusText.contains('Modified android files:\n'), true); | |
| expect(logger.statusText, contains('Modified android files:\n')); |
jonahwilliams
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
Tooling change to generate the encoding read by flutter/engine#24983
This encodes base loading units so that the download can be skipped and directly installed from local .so files.