Description
Current State
Version and migration options are controlled by -source
, with possible values
3.0-migration, 3.0, 3.1-migration, 3.1
This can be given as a command line option, as -source <version>
, or with a language import, as in
import language.`3.1`
The Problem
We are not at all sure whether everything enabled under -source 3.1
will actually ship in 3.1. We have allowed us great flexibility when to ship new minor versions. 3.1 could happen some months after 3.0 ships and we might still want to enable cross compiling for it, so that many of the deprecations and removals slated for 3.1 would have to wait. So we need a more flexible way to say a feature or deprecation is enabled in a future language version, without being fully precise which one.
Constraint
Any proposed solution has to allow controlling version and migration mode from the command line as well as through a language import.
Possible Solutions
- Keep the current scheme, but rename
3.1
and3.1-migration
to3.x
and3.x-migration
. - Keep the current scheme but rename
3.1
and3.1-migration
tofuture
andfutureMigration
. The language import would beimport language.future import language.futureMigration
- Replace future source versions by a language import
future
and control migration through another language importmigration
. So instead ofit would beimport language.`3.1-migration`
and instead ofimport language.{future, migration}
-source 3.1-migration
it would be-language:future,migration
.
This would mean we would also get rid of3.0-migration
as a separate source version, so instead of
-source 3.0-migration
we'd have-source 3.0 -language:migration
. The-source
argument would be
redundant as long as default source is 3.0, but would be important if the default source version changed. One could also allow a command line option -migration as a shorthand for-language:migration
.
Which alternative should we choose? Are there others to consider?