Skip to content

[native assets] dartdev commands should be a nop if nothing changed #59668

Open
@dcharkes

Description

@dcharkes

In Flutter, running flutter run twice in a row without changing any files in between, uses cached build artifacts.

In Dart, dart run caches the Dart build by virtue of shelling out to pub to do the caching (which we should maybe fix).

With the native assets work, we're introducing non-Dart build steps to the process. The native_assets_builder already early returns. However, with https://dart-review.googlesource.com/c/sdk/+/381580, we start doing subsequent steps (such as rewriting load paths and code signing). These steps can potentially cached, if we recognize the un-rewritten/un-signed dylibs didn't change since the last run.

Marking as somewhat low prio, as this can be optimized later.

(And we should probably look at if dartdev itself needs some caching logic like flutter_tools has with its Targets. And move the responsibility of caching kernel compilation from pub to dartdev. @bkonyi @jonasfj)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-native-interopUsed for native interop related issues, including FFI.

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions