-
Notifications
You must be signed in to change notification settings - Fork 29.7k
[flutter_tools] fix recursive asset variant issue #61129
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
| final String path = entity.path; | ||
| if (globals.fs.isFileSync(path) && !_excluded.any((String exclude) => path.startsWith(exclude))) { | ||
| if (globals.fs.isFileSync(path) | ||
| && assetPath != path |
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.
need to check the assetPath != path, otherwise the tool recognizes assets: - foo.txt as its own asset variant.
jmagman
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
|
| /// Constructing DeviceManagers is cheap; they only do expensive work if some | ||
| /// of their methods are called. | ||
| List<DeviceDiscovery> get deviceDiscoverers => _deviceDiscoverers; | ||
| final List<DeviceDiscovery> _deviceDiscoverers = List<DeviceDiscovery>.unmodifiable(<DeviceDiscovery>[ |
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 was getting hit in devices_test and failing if it grabbed the wrong context, I did some minor cleanup but it needs to be fixed later so that there is no accidental caching
Fixes flutter#45075 Fixes flutter#57210 If an asset was included directly from the project root directory, then the same asset when copied to various output or ephemeral directories would also be picked up as an asset variant. This could cause assets to be recursively copied into asset/build/ephemeral directories, as each time it would run it would pick up all of the previous "variants". The solution is to include project ephemeral directories, in addition to the build directory.
* Update engine hash to 1.20.3 * Re-enable image_list test with updated certificate(good for 3650 days). (#64519) * [Material] Relanding fix to ensure time picker input mode lays out correctly in RTL (#64097) * allow null in compute for weak mode (#63515) * [flutter_tools] fix recursive asset variant issue (#61129) * [flutter_tool] Handle Windows line endings in packages_test.dart (#63806) * [flutter_tool] Fix some create_test.dart tests on Windows (#63796) Co-authored-by: Alexander Aprelev <[email protected]> Co-authored-by: Rami <[email protected]> Co-authored-by: Alexandre Ardhuin <[email protected]> Co-authored-by: Jonah Williams <[email protected]> Co-authored-by: Zachary Anderson <[email protected]>
Fixes flutter#45075 Fixes flutter#57210 If an asset was included directly from the project root directory, then the same asset when copied to various output or ephemeral directories would also be picked up as an asset variant. This could cause assets to be recursively copied into asset/build/ephemeral directories, as each time it would run it would pick up all of the previous "variants". The solution is to include project ephemeral directories, in addition to the build directory.
* Update engine hash to 1.20.3 * Re-enable image_list test with updated certificate(good for 3650 days). (flutter#64519) * [Material] Relanding fix to ensure time picker input mode lays out correctly in RTL (flutter#64097) * allow null in compute for weak mode (flutter#63515) * [flutter_tools] fix recursive asset variant issue (flutter#61129) * [flutter_tool] Handle Windows line endings in packages_test.dart (flutter#63806) * [flutter_tool] Fix some create_test.dart tests on Windows (flutter#63796) Co-authored-by: Alexander Aprelev <[email protected]> Co-authored-by: Rami <[email protected]> Co-authored-by: Alexandre Ardhuin <[email protected]> Co-authored-by: Jonah Williams <[email protected]> Co-authored-by: Zachary Anderson <[email protected]>
Description
Fixes #45075
Fixes #57210
If an asset was included directly from the project root directory, then the same asset when copied to various output or ephemeral directories would also be picked up as an asset variant. This could cause assets to be recursively copied into asset/build/ephemeral directories, as each time it would run it would pick up all of the previous "variants".
The solution is to include project ephemeral directories, in addition to the build directory.