pub icon indicating copy to clipboard operation
pub copied to clipboard

Support explicit language version declaration in pubspec.yaml

Open jonasfj opened this issue 3 years ago • 2 comments

jonasfj avatar Sep 06 '22 12:09 jonasfj

Is this still desired? I think the SDK constraint lower-bound being the language version is well established now and makes sense.

parlough avatar Oct 08 '24 00:10 parlough

I think we still dream of this.

Having to write

environment:
  sdk: ^3.5.0

Is a bit of a mouthful, and not all that intuitive. If all that we want to express is something along the lines of

dart: 3.5

There are several reasons we haven't done this yet. At least:

  • It is not clear what happens if you have conflicting sdk constraint and language version (can you require a newer sdk, but still be written in an older language? do we want to allow that?)
  • 3.5 unquoted is a float not a string in yaml, complicating the parsing quite a bit.

sigurdm avatar Oct 08 '24 08:10 sigurdm