[ffigen] Output dependencies
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 47
Description
If FFIgen is run as part of another build system (https://github.com/dart-lang/native/pull/977#issuecomment-1984614525), or if FFIgen is run as standalone (https://github.com/dart-lang/native/issues/879), it would be useful to know what files an FFIgen run transitively depends on.
The list of files / directories / glob patterns should include:
* entrypoints headers declared in config.
* Any transitive dependencies (can libclang report what was used? Would using include directive suffice?)
* ~~`pubspec.yaml` ffigen version might be updated~~ We're transitioning to Dart API and it would be better to treat both the Dart sources for the generate script as well as FFIgen as a single set of Dart sources (https://github.com/dart-lang/native/issues/879#issuecomment-3722831017)
* ~~`ffigen.yaml` the config file~~ We're transitioning to Dart API (https://github.com/dart-lang/native/issues/879#issuecomment-3722831017)
For standalone runs:
* We should maybe save the environment, so that subsequent runs can check for equality.
For runs from another build system:
* We should maybe have a flag in the config to ignore the environment (A build system invoking might also try to invoke FFIgen with a (mostly) empty environment https://github.com/dart-lang/native/issues/32)
The list of files/directories/globs should be output in some kind of format. (Maybe we should align with the `BuildOutput.dependencies` in the native assets CLI, which currently supports files and directories.)
Edit: This would tie in to https://github.com/dart-lang/sdk/issues/56512.
Contributor guide
Assessment
This issue has not been assessed yet.