-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 VM libraries to NNBD #38037
Comments
I had not considered this yet, I will have to add it to our list of things to do for nnbd. |
We will shortly land a copy of sdk/sdk as sdk/sdk_nnbd . Migration will happen in place there. When we flip the experiment flag on by default, we can then unfork by copying over sdk_nnbd to sdk. In the meantime, we need to be be sure that any non-nnbd related changes go into both copies. The migration itself might take advantage of the analyzer's migration tool where possible, but will also require somebody to just look at the APIs and make decisions about where to allow nullability, and then propagate that through the code. |
One important caveat is that the VM's patch files do not live in sdk/. |
@sortie I heard indirectly that you might be considering taking on io, is that correct? |
@leafpetersen No, this is the first I hear about this. I did talk about Bob about migrating benchmarks, but that is another issue. I do currently own dart:io. What would be involved in migrating such a library, or reviewing such changes? |
Ah, maybe I was just told that you were taking over dart:io, and hence you might be the right person to talk to. In any case, someone needs to migrate the copy of dart:io in sdk_nnbd. This means basically two things: first making the API choices about which things should be nullable, and secondly migrating the code to be null clean. I could show you how to run the analyzer on the code with the experiment enabled. |
I can take care of However, I'd like to only get started on this once we have some automated testing in place. Please keep me updated on the testing of the sdk_nnbd folder. |
Hi @leafpetersen, can you describe the steps needed to migrate |
Ping @leafpetersen |
Thanks for looking into this! The plan for the
I'd suggest that you might want to follow the same workflow. With that in mind, the first step is to make the API choices about what parameters/return types should be nullable vs non-nullable, and to get the code passing the static analyzer. You can run the analyzer on core libraries as follows:
You will need to remove the
Some example CLs showing how other core libraries were migrated:
Feel free to ping me, @munificent or @lrhn with questions about the NNBD features or whatever. Reviews can probably also be sent our way. |
The current open list is:
I believe that @sortie owns io, @dcharkes can you start on ffi? The test infrastructure is in place, you will probably need to port your own tests though. @munificent can help with the process. |
Migration instructions here. |
There are subissues here for the various VM libraries, but it's not clear how those libraries map to tests in the "tests" directory. Can someone confirm that these test directories are all fully covered by this issue:
We are migrating tests by forking all of them which means it's possible for tests to slip through the cracks if no one owns a directory. Will the VM team claim all of those? |
This is done, we have switched all the libraries to the NNBD versions in the NNBD sdk builds. |
This tracks the migration of the VM specific platform libraries to NNBD. Specifically, this covers the following libraries:
The text was updated successfully, but these errors were encountered: