Check generated features against SDK constraint of user
Open
package:ffigen
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 47
Description
@jonasfj suggested that we should check the SDK constraint for the package we're generating to and give an error if we generate `dart:ffi` code that does not work on the oldest version.
* Unions should only work for SDK constraint 2.14 and higher.
* Packed structs and inline arrays should only work for SDK constraint 2.13 and higher.
* etc.
Then we tell our users to bump their SDK version to the one that the generated code will work for so that they don't accidentally upload code to pub which contains `dart:ffi` constructs that will only work on the latest stable release while their pubspec says it would work on older stable releases.
Contributor guide
Assessment
This issue has not been assessed yet.