You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
More and more Dart tools are relying on the Dart language version of a project or file, but there's no standard way to communicate about a language version. Some tools have used Version from package:pub_semver, but it's not meant for language versions and is a bit heavy weight. While others have created their own types to represent the information.
package:package_config does have a public LanguageVersion class, but it hasn't consistently been used. Perhaps because package developers think it's only for package config functionality or because it includes
A focused package with a LanguageVersion interface (or shared concrete implementation) would enable a small, stable dependency that different tools and packages can use to share Dart language versions. Related types, such as Version in package:pub_semver could add extension methods to convert both directions as well.
A few users of language version and their solution.
parlough
changed the title
Create and publish a minimal package with a shared LanguageVersion type
Create and publish a package with a shared LanguageVersion type
Dec 10, 2024
More and more Dart tools are relying on the Dart language version of a project or file, but there's no standard way to communicate about a language version. Some tools have used
Version
frompackage:pub_semver
, but it's not meant for language versions and is a bit heavy weight. While others have created their own types to represent the information.package:package_config
does have a publicLanguageVersion
class, but it hasn't consistently been used. Perhaps because package developers think it's only for package config functionality or because it includesA focused package with a
LanguageVersion
interface (or shared concrete implementation) would enable a small, stable dependency that different tools and packages can use to share Dart language versions. Related types, such asVersion
inpackage:pub_semver
could add extension methods to convert both directions as well.A few users of language version and their solution.
package:package_config
- CustomLanguageVersion
class in public APIdart-lang/build
- TheLanguageVersion
type frompackage:package_config
(Example usage)pkg/_macros
- CustomLanguageVersion
interfacedart-lang/pub
- CustomLanguageVersion
class with support for comparisonsdart-lang/dart_style
-Version
frompackage:pub_semver
analyzer
-Version
frompackage:pub_semver
The text was updated successfully, but these errors were encountered: