Description
After the hooks are run in dartdev/flutter_tools, the assets might be copied/signed/install_name
modified etc.
We'd like to ensure that we can cache those steps.
We cannot blindly rely on timestamps, as a hook might return a file with an older timestamp (on Windows downloaded files have their creation date as lastmodified, not the downloaded time). We could fix this by mandating that assets should have monotonically increasing timestamps, but that puts burden on the hook writer.
Maybe there are better solutions (using a hash, ...).
Also flutter run
and flutter build --release
copy files both to build/native_assets/*
which also breaks the NOP-ness.
To investigate
- What does flutter_tools currently do? (Possibly content hashes https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/build_system/build_system.dart#L1174)
Context:
- [native_assets_builder] Set the last modified date of assets to the build output timestamp #1533 (comment)
- https://dart-review.googlesource.com/c/sdk/+/381580/5/pkg/dartdev/lib/src/native_assets_bundling.dart
This needs to play well with concurrent invocations as well:
Edit:
- We probably want to align the hook caching ([native_assets_builder] Caching strategy for hook invocations #1593) with whatever dartdev and flutter_tools are doing with the results of the hooks (this issue).
Thanks @mkustermann and @blaugold
Metadata
Metadata
Assignees
Labels
Type
Projects
Status