Skip to content

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

Open
@dcharkes

Description

@dcharkes

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:

Edit:

Thanks @mkustermann and @blaugold

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions