dart-lang / dart-lang/native

Check generated features against SDK constraint of user

Open
#361 8 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.