Closed dcharkes closed 4 days ago
@jensjoha can the CFE output a list of dart source files?
The frontend_server for instance lists the keys in component.uriToSource
(as in +file1\n+file2
etc). Is that what you want? (I seem to be missing some context here).
We could even make flutter build
and dart build
:
N
hook/*
scripts.N
scripts to compile.d
file containing dependenciesMost of our tools already support emitting .d
dependency files (e.g. dart --snapshot-kind=kernel --snapshot=test.dill --depfile=test.dill.d test.dart
, frontend-server, dart2js, dart2wasm, ...) - because flutter already needs those dependency files to detect whether to rebuild things.
We should be really optimizing for compile times in dart build
/ flutter build
, e.g. if the package graphs depth is 30 and all of them use hooks, saving a single second (e.g. via parallel compile of hooks to kernel) would save half a minute for a developer.
Guys, I’m not on your team!
Private and Confidential
Maximilian A. Kustermann @.***
On Mon 15. Jul 2024 at 10:14, Daco Harkes @.***> wrote:
Closed #1256 https://github.com/dart-lang/native/issues/1256 as completed.
— Reply to this email directly, view it on GitHub https://github.com/dart-lang/native/issues/1256#event-13501809283, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABS4RZKYOHMBXTWT4DISVFDZMOAHHAVCNFSM6AAAAABKHMUOX2VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGUYDCOBQHEZDQMY . You are receiving this because you were mentioned.Message ID: @.***>
The compiler should know what Dart source files have been used running a Dart script. So we shouldn't request hook writers to list transitively all Dart files in
HookOutput.dependencies
.Currently the hook is run as
dart path/to/some/hook/<hookname>.dart --config=path/to/config.json
.In order to get a list of all Dart files used, we have multiple options:
.d
file (not preferred, I'd rather not depend on SDK internals.).--dependencies=path/to/deps.d
todart
.dart --dependencies=path/to/deps.d path/to/some/hook/<hookname>.dart --config=path/to/config.json
. This could be used for other use cases as well. (preferred)Then we can also get rid of the weird
dartBuildFiles
for theCBuilder
:Thanks @kustermann!