-
Notifications
You must be signed in to change notification settings - Fork 211
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
Migrate user-facing apis to null-safety #2996
Conversation
Thanks for starting on this! As you have probably discovered this is going to be a large and somewhat complicated effort. My thoughts were that we should be able to migrate mostly in a bottom up fashion, one package at a time. I do believe it is feasible to do that, although I am not sure all of the packages are unblocked yet, and we will want to wait on that probably before publishing any of them (I think it just gets confusing otherwise, and it doesn't unblock anybody). Tests would initially all be opted out (or run in --no-sound-null-safety mode). Maybe the latter is better. The order would be roughly [ Then we would go back through and enable sound null safety on all the tests, fixing things up as needed. I think probably we would want to do all of this before we publish any of them, get them all passing tests and happy, etc. That means a somewhat long feature freeze most likely. Whenever one is migrated you would have to go add overrides for it in all the ones that depend on it. Another option we may want to consider, is splitting this into two chunks for publishing. If we get The rest of the packages are more related to the build script itself, which can be tackled as a separate thing, and is honestly just a non-goal for the immediate future. |
cc @natebosch |
Thanks for the quick feedback!
From a builder-author perspective, this is what I was aiming for. I want to write and test my builders with sound null safety, but I don't care about whether the actual build runner is using null safety or not (similar to the story with
|
They can be migrated separately - just the tests have to be opted out (or ran without sound null safety and add an ignore to the imports). |
I am OK though with a larger PR that migrates them all at once, but its more difficult to manage and review etc. It is easier to have a few smaller PRs and then go back and enable sound null safety in a followup imo. |
Fair enough, I'll open another PR for And unfortunately I had to add lots of dependency overrides now: Since |
Ya I am fine with keeping this PR as is at this point and not splitting it up. |
Ya, this mono_repo is definitely more than a bit crazy like that |
I think we might want to put this on hold until the test packages support the latest analyzer. The dependency conflicts are getting out of hand. |
sgtm |
I'll wait for #3003 to land before fixing conflicts (otherwise I'd effectively have to do it twice). Apart from that, I think this should be ready now. |
Sounds good, we probably also want to actually do a round of releases as well before merging and releasing this. |
Definitely. And if we end up doing a |
@simolus3 we should be ready to proceed here if you want to merge with master and I can take another pass over the pr |
Note that our tests red on master right now, I am working on fixing them. |
Re-running the tests now, should go green |
@simolus3 I think maybe you need to merge with master again to get the test fixes? |
@@ -1,3 +1,7 @@ | |||
## 1.4.0-dev | |||
|
|||
- Migrate to null safety |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for completeness, I want to point out that this package is not fully migrated yet (and shouldn't be released as-is). We're still blocked by build_resolvers
, which is blocked by graphs
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood, did you plan to look at those or should one of us (either is fine, just want to not duplicate work :) )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of you would have to take a look at dart-archive/graphs#52. As soon as that package is migrated I'm happy to work on build_resolvers
and the rest of build_test
.
are you planning to release? |
Probably sometime next week, there is another small breaking change we are rolling as a part of this release (#1899) but its going to take a little bit to roll that out (and I am OOO for the rest of this week). |
Migrate packages typically imported by build authors to null-safety (part 1 /3). Closes #2920
In this PR, I migrate
build
packagebuild_test
package (or rather, the parts of that package that don't importbuild_resolvers
)scratch_space
packageAfter the
graphs
package is migrated, I'll open another PR to migrate thebuild_resolvers
package. When that one is done too, we can start to opt the tests ofbuild
andbuild_test
into null-safety and publish, thus enabling build authors to write and test their builders with strong null-safety.Migrating the rest of the build system is not a goal for the near future, so we won't run builds with strong null-safety.