-
Notifications
You must be signed in to change notification settings - Fork 503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just Editions #1201
Comments
Rust-style editions are a good idea in general. |
Editions sound nice! As long as the maintenance burden doesn't go up too much from maintaining multiple versions. I wish there was a better way to use the latest edition by default so that What sort of changes would come with the next edition? Some random possible issues and other thoughts:
|
This is mostly copy-pasta'ed from my comment here.
Just is now 1.0, and has a strong commitment to backwards-compatibility. In practice, backwards-compatibility was important even before 1.0, since there have been enough justfiles out there for a while now that breaking things would have been really annoying for users.
However, time marches forward, and there will always be backwards-incompatible changes that seem desirable to introduce, and old mistakes that would be nice to fix.
To be able to make changes while preserving backwards compatibility, I suggest we steal Rust's concept of an edition. An edition is an opt-in set of backwards-incompatible changes. For
just
, it would work like this:set good-thing := true
, so that it doesn't break existing justfiles.set dont-do-bad-thing := true
, so that it doesn't break existing justfiles.good-thing
anddont-do-bad-thing
are good and useful enough that they should be true by defaultedition
, that takes a number. If you don't set it, it defaults toset edition := 1
, which corresponds to the wayjust
works now.2
, which, if you doset edition := 2
, turns on bothgood-thing
anddont-do-bad-thing
.Pros:
set edition := LATEST_EDITION
and get good defaultsCons:
set edition := 2
at the top of their justfile or else they get edition 1.The text was updated successfully, but these errors were encountered: