flutter/packages/flutter_tools/test/general.shard/build_system
Andrew Kolos ebe53d570a
Fix asset transformation in the presence of resolution-aware asset variants (#151932)
For the necessary background knowledge, see the flutter.dev content on [Resolution-aware image assets](https://docs.flutter.dev/ui/assets/assets-and-images#resolution-aware) and [Conditional bundling of assets based on app flavor](https://docs.flutter.dev/ui/assets/assets-and-images#conditional-bundling-of-assets-based-on-app-flavor) if you don't have a basic understanding of these features.

Fixes https://github.com/flutter/flutter/issues/151813 by using unique temporary directories, per asset file, for transformations. Currently, only a single directory is used and the name of the temporary files was based only on the basename of files. This means that `assets/image.png` and `assets/2x/image.png` would share an output path (`<temp dir path>/image.png`), causing a race. If this quick and rough explanation is a bit confusing, the original issue—#151813—provides a full repro and correct identification of the exact cause of the failure that can occur in the asset transformation process.
2024-07-22 23:46:19 +00:00
..
targets Fix asset transformation in the presence of resolution-aware asset variants (#151932) 2024-07-22 23:46:19 +00:00
build_system_test.dart Dual compile reland (#143262) 2024-02-13 20:02:10 +00:00
depfile_test.dart Fix typos (#121171) 2023-02-23 19:43:21 +00:00
exceptions_test.dart Remove globals_null_migrated.dart, move into globals.dart (#92861) 2021-11-01 17:18:03 -07:00
file_store_test.dart Cast config values to dynamic values instead of Object (#80011) 2021-04-08 15:18:28 -07:00
hash_test.dart Convert some general.shard base tests to null safety (#79985) 2021-04-08 14:55:19 -07:00
invalidated_reason_test.dart Migrate some flutter_tools tests to null safety (#88850) 2021-08-25 16:21:04 -07:00
source_test.dart [flutter_tools] migrate more unit tests to null safety (#106153) 2022-06-17 21:34:27 -07:00