Reputation: 1759
I published a package a while ago. But after new analysis, it gives the warning
Package not compatible with SDK dart
It shows
Analysis suggestions:
Package not compatible with SDK dart
because of import path [ola_like_country_picker]
I didn't get where this error is coming from. Here is the link to the package https://pub.dev/packages/ola_like_country_picker#-analysis-tab-
Upvotes: 1
Views: 530
Reputation: 8246
this is addressed in this github issue
TLDR
When flutter did federated packages we talked about giving a package two version numbers. This we resolved by creating two packages.
Maybe there is two packages here:
package:kernel_api which is a series of abstract classes. The major version is only bumped when the interfaces for parsing kernel
files are broken. package:kernel_parser which has a function that return concrete instance of an abstract class from package:kernel_api, which can be used to parse kernel files. The major version of this package is bumped whenever the kernel format breaks. In practice it might follow the Dart SDK minor versions (for it's major version).
This say you version the file-format in a package different from the versioning of the interfaces used to read the file-format. If this makes any sense :) https://github.com/dart-lang/sdk/issues/39167#issuecomment-547646728
After some discussion about this in Aarhus between myself, @jonasfj, @johnniwinther, @stefantsov, and @jensjoha , we're contemplating the idea of moving the shared parts of analyzer and front_end into a new package (which, notably, would not depend on kernel). That would decouple the analyzer from kernel completely. It wouldn't directly address this issue, but it would shrink its scope by decoupling the decision of how to import kernel (and what version to import) from any analyzer considerations. We could then consider options like:
Flutter's transformer imports kernel directly from the SDK using a relative path Kernel increments their major version number with every SDK release, so that Flutter can be assured they have a compatible version
of kernel by putting the proper version in the pubspec Kernel publishes a separate package for each SDK release (e.g. kernel_2_7 to go with Dart 2.7) Kernel is split into two packages, along the lines of @jonasfj's suggestion above.
I'm currently awaiting feedback from the analyzer and front end teams about the idea. https://github.com/dart-lang/sdk/issues/39167#issuecomment-547984002
Upvotes: 1