Make config_provider a reusable abstraction for other packages with a yaml-config
Open
package:ffigen
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 47
Description
It would be nice if we could share some logic with for example:
* https://github.com/dart-lang/jni_gen/pull/32
Currently the confg_provider is tightly coupled with ffigen config, but it has some reusable abstractions:
```dart
Specification(
requirement: Requirement.no,
validator: booleanValidator,
extractor: booleanExtractor,
defaultValue: () => false,
extractedResult: (dynamic result) =>
_excludeAllByDefault = result as bool,
),
```
Everything besides `extractedResult: ...` in this snippet is reusable.
Contributor guide
Assessment
This issue has not been assessed yet.