Skip to content

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

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

Open
dcharkes opened this issue Dec 5, 2024 · 0 comments
Open

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

dcharkes opened this issue Dec 5, 2024 · 0 comments
Labels
area-native-interop Used for native interop related issues, including FFI. P3 A lower priority bug or feature request

Comments

@dcharkes
Copy link
Contributor

dcharkes commented Dec 5, 2024

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)

@dcharkes dcharkes added P3 A lower priority bug or feature request area-native-interop Used for native interop related issues, including FFI. labels Dec 5, 2024
@dcharkes dcharkes added this to the Native Assets v1.x milestone Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-native-interop Used for native interop related issues, including FFI. P3 A lower priority bug or feature request
Projects
Status: No status
Development

No branches or pull requests

1 participant