Skip to content
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

[dartdev][flutter_tools] Rerunning commands needs to be a NOP for assets if hooks were cached #1552

Open
1 task
dcharkes opened this issue Sep 11, 2024 · 0 comments

Comments

@dcharkes
Copy link
Collaborator

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

Context:

This needs to play well with concurrent invocations as well:

Thanks @mkustermann and @blaugold

@dcharkes dcharkes added this to the Native Assets v1.0 milestone Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant