-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Implement "experiment release versions" #43031
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
Comments
Marking as a P1 because this will be a blocker for any 2.11 release |
Note also that we had not discussed concretely the naming of the new field, I called it |
Note that as far as I can tell today we do not ship the |
does this work need to land prior to the 2.10 build going to stable, or just before we bump to 2.11? |
This needs to land before we bump to 2.11 which generally happens well before the previous stable release nowadays afaik. |
ah sorry I should have said "before 2.10 branches," which would mean we need all code submitted prior to that point (week of sept 7). it sounds like that is not the case, but pretty close. do you have any concerns with getting this work landed in the next 2 weeks? |
Expanding on the comment from @pcsosinski , I believe it is the case that we do not need this to be actually in the 2.10 release, since 2.10 will treat 2.10 as the language version for null safety anyway. That is, if necessary, we could branch 2.10 before this lands, but delay bumping the minor version in master (e.g. by bumping to 2.10.10-dev.0 instead). @jakemac53 do you agree or do we need to make this a release blocker for 2.10? |
Yes I agree @leafpetersen - this only has to land before the minor version switch, whenever that is. |
Are we target to finish everything on Sept. Release? If not I will remove the P1 label and the Sept milestone |
Well, I have no idea what |
last we discussed w/ @leafpetersen the hope was to have this done before the Sept branch cut (meaning done by end of next week, Sept 3rd). @jakemac53 do you think we're on track for that? |
Yes, I think we are on track. It sounds like the core work is done. The remaining work is the language test which I can do asap, and the package related things which don't have to be done before the branch is cut (but also should not take long). @scheglov any idea when this would land in an analyzer release? (note I am not asking for a release this moment) |
I can release There is a refactoring going on in the analyzer, but I guess I could release a version before this refactoring started if necessary. |
Note that the language tests can't really do anything useful here until 2.11 - but I was planning on manually doing the 2.11 switch locally and running them.
This is not super urgent - the first external users who will need it will be the 2.11 dev sdk users which is likely still a ways off. |
So am I correct in understanding that all of the work that needs to happen in the SDK (that is, that would block the branch cut) has been completed? |
I have a test cl out here https://dart-review.googlesource.com/c/sdk/+/161342 to run on the bots as a way of confirming we will be good to switch to 2.11.
|
cc @johnniwinther I am seeing cfe failures on that CL for both language tests, see https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8870342994982956032/+/steps/test_results/0/logs/new_test_failures__logs_/0 |
I'll take a look at the CFE failures on https://dart-review.googlesource.com/c/sdk/+/161342 |
A fix for the (unintended) CFE failures is in progress: https://dart-review.googlesource.com/c/sdk/+/161503 |
I have confirmed that cl (https://dart-review.googlesource.com/c/sdk/+/161503) does in fact resolve the cfe issues - there are only 2 minor failures when switching the version now which look unrelated. |
All necessary work done |
Uh oh!
There was an error while loading. Please reload this page.
General overview
Today, experiments are only enabled for a library if it is on the "current language version". This causes problems when the SDK depends on packages which enable experiments, as it creates a chicken and egg situation.
The planned fix is to add a feature which enables experiments to optionally be given a “release version” which becomes the language version which serves as the opt-in for that feature, instead of the current language version.
We will use this feature to mark
2.10
(or possibly) as the experiment release version for the null safety experiment, and prevent a repeat of what happened in the 2.9->2.10 transition.2.9
cc @leafpetersen ?Implementation details
Add an
experimentLanguageVersion
field to experiment configurationAn additional optional field is to be added to the entries in the
features
section of the experimental_features.yaml file. This field will be calledexperimentLanguageVersion
, and will accept a language version string.If present, then the specified language version will be the required version to enable the feature, instead of the "current" version which is the default. This only takes effect in the presence of the
--enable-experiment=<experiment>
flag, or an allow list entry that enables the experiment for the library.Note that the feature must continue to be enabled with a combination of the experiment flag and corresponding experimental release version even after the feature ships. This allows us to transition smoothly from the experiment to a stable release. In some subsequent stable sdk the
experimentLanguageVersion
field may however be removed, at which point the experiment flag will no longer have any effect, and packages will have to migrate to the language version in which the feature was released.Both the analyzer and cfe will need to support this new configuration.
See go/experiments-crossing-stable-releases for the full discussion (internal only doc).
Ship the experiments file with the sdkSee #43040, some external tools will need access to this now.We decided we don't need to do this.
Language tests
@jakemac53 will add some language tests to cover the behavior change (to whatever extent is feasible)
Publish a new analyzer version with the changes
Once the feature has been implemented, we need to publish a version of the analyzer, ideally well in advance of the first 2.11 dev release of the sdk.
Other tool updates
Some other tools such as pub, pana, and build_resolvers also have knowledge of experiments and what language versions are required for them to be enabled. These will have to be updated to support the new release version option.
Checklist
Ship the experiments file in the sdk Ship theexperimental_features.yaml
file with the SDK #43040Pub updates Update null safety detection logic to support "experimental release versions" pub#2621We decided this was not required- [ ] build_resolvers updates Update/remove experiment warnings build#2787We decided this was not requiredThe text was updated successfully, but these errors were encountered: