[flutter_tools] Deferred components: Encode base module loading units in manifest metadata#78079
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.
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.
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.
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.
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')); |
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.