8000 [integration_test] Needs null safety migration · Issue #71379 · flutter/flutter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[integration_test] Needs null safety migration #71379

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

Closed
creativecreatorormaybenot opened this issue Nov 29, 2020 · 59 comments · Fixed by #74922 or #75074
Closed

[integration_test] Needs null safety migration #71379

creativecreatorormaybenot opened this issue Nov 29, 2020 · 59 comments · Fixed by #74922 or #75074
Assignees
Labels
a: null-safety Support for Dart's null safety feature a: tests "flutter test", flutter_test, or one of our tests c: proposal A detailed proposal for a change to Flutter dependency: dart Dart team may need to help us f: integration_test The flutter/packages/integration_test plugin P1 High-priority issues at the top of the work list package flutter/packages repository. See also p: labels. r: fixed Issue is closed as already fixed in a newer version

Comments

@creativecreatorormaybenot
Copy link
Contributor
creativecreatorormaybenot commented Nov 29, 2020

Because many plugins depend on integration_test in order to do their testing, the package should be migrated to support null safety.

https://pub.dev/packages/integration_test

@pedromassangocode
Copy link

This was being worked in flutter/plugins#3158 but according to flutter/plugins#3158 (comment) the package is being moved to flutter repository so not really sure if this was already addressed or not.
Cc @dnfield @ferhatb

@pedromassangocode pedromassangocode added a: null-safety Support for Dart's null safety feature a: tests "flutter test", flutter_test, or one of our tests passed first triage c: proposal A detailed proposal for a change to Flutter f: integration_test The flutter/packages/integration_test plugin labels Nov 30, 2020
@ferhatb
Copy link
Contributor
ferhatb commented Nov 30, 2020

/cc @ditman @nturgut

@dnfield
Copy link
Contributor
dnfield commented Nov 30, 2020

This is blocked by migrating package:vm_service.

@dnfield
Copy link
Contributor
dnfield commented Nov 30, 2020

@bkonyi

@bkonyi
Copy link
Contributor
bkonyi commented Nov 30, 2020

package:vm_service is basically ready to go, but there's a bit of a dance we need to do in order to land. We'll need to also migrate package:dwds and likely DevTools to null safety. @devoncarew, is there anything else I've missed here?

@devoncarew
Copy link
Member

Those are the bigger users that I'm aware of.

The rollout could probably do with a little planning - perhaps in an issue at flutter/devtools? Specifically:

DevTools does want to be able to ship to older stable SDKs (2.10 say).The web app has a dep on vm_service (https://github.com/flutter/devtools/blob/master/packages/devtools_app/pubspec.yaml#L41). We can likely develop that against a dev sdk - the compiled output is used by the user, not the devtools_app package itself. The devtools server also has a dep on vm_service (https://github.com/flutter/devtools/blob/master/packages/devtools_server/pubspec.yaml#L26). We likely couldn't move that dep to the null safe one until we no longer need to support 2.10 for new devtools releases.

cc @grouma @kenzieschmoll for dwds and devtools planning here

@grouma
Copy link
Member
grouma commented Nov 30, 2020

Those are the bigger users that I'm aware of.

The rollout could probably do with a little planning - perhaps in an issue at flutter/devtools? Specifically:

Although not a deal breaker, this puts package:webdev in an odd state. Given how webdev is used as a globally activated package, we don't want it to require dev SDKs. If we upgrade package:dwds, we may be blocked on publishing new versions of package:webdev until the stable SDK lands. However, we should be able to publish new versions of package:dwds whenever.

  • that's not an issue for the main consumer of package:dwds - flutter/flutter

DevTools does want to be able to ship to older stable SDKs (2.10 say).The web app has a dep on vm_service (https://github.com/flutter/devtools/blob/master/packages/devtools_app/pubspec.yaml#L41). We can likely develop that against a dev sdk - the compiled output is used by the user, not the devtools_app package itself. The devtools server also has a dep on vm_service (https://github.com/flutter/devtools/blob/master/packages/devtools_server/pubspec.yaml#L26). We likely couldn't move that dep to the null safe one until we no longer need to support 2.10 for new devtools releases.

cc @grouma @kenzieschmoll for dwds and devtools planning here

@bkonyi I think it's worth setting up a quick sync to ensure we are all on the same page here.

@devoncarew
Copy link
Member

To close the loop here, given that several different packages and tools have tight version range deps on package:vm_service, it may be useful if this particular reference to it was in-lined. This file: https://github.com/flutter/plugins/blob/master/packages/integration_test/lib/integration_test.dart seems to make light use of the library, so could just as easily use a small, hand-written wrapper that speaks to the VM via sending and receiving the json RPC calls.

@dnfield
Copy link
Contributor
dnfield commented Dec 2, 2020

flutter_tools also will want to migrate to null safety at some point, and also depends on vm_service.

integration_test only makes light use, but flutter_driver makes heavier use, and integration test has dependencies on flutter_driver. We could just avoid using vm_service, but we'd basically be re-implementing it there, and it's not a completely trivial task.

@grouma
Copy link
Member
grouma commented Dec 2, 2020

flutter_tools also will want to migrate to null safety at some point, and also depends on vm_service.

This shouldn't be on the critical path though? We should be able to wait until the next stable release.

@dnfield
Copy link
Contributor
dnfield commented Dec 2, 2020

No, flutter_tools is separate from this completely. But flutter_driver is not separate.

What's the timeline for the next stable release that would make all of this easier?

@dnfield
Copy link
Contributor
dnfield commented Dec 7, 2020

@grouma @bkonyi @devoncarew - to clarify again, in case I haven't made it clear enough: integration_test and flutter_driver both have to be migrated to close this bug. There is significant use of vm_service in flutter_driver that I would not feel comfortable rolling into the Flutter repo.

It would really help to have a clearer timeline (in this bug or a doc/sheet or somewhere) that we can follow to know when this gets unblocked and what its current status is. If this really is blocked until the next stable release of Dart, it'd be good to know what the date (or at least the estimated date) is for that.

/cc @csells

@dnfield dnfield added the dependency: dart Dart team may need to help us label Dec 7, 2020
@grouma
Copy link
Member
grouma commented Dec 7, 2020

Thanks for raising your concerns @dnfield. I was under the impression that Devon's suggestion was sufficient. I set up a sync so we can better coordinate the package:vm_service migration.

@goderbauer
Copy link
Member

This is currently blocking #67447.

@devoncarew
Copy link
Member

FYI, @bkonyi has migrated package:vm_service to null safety; https://pub.dev/packages/vm_service @ 6.0.0-nullsafety-dev.

@ditman
Copy link
Member
ditman commented Jan 13, 2021

This is great news! Thanks @bkonyi!!!

@lukepighetti
Copy link
Contributor
lukepighetti commented Feb 3, 2021

I didn't want to kick up any more dust in this thread, but we are also not willing to track dev for our packages, only beta. Probably a separate thread, but do we have stats for what channel most developers are using? We track beta to try to split the difference between those on stable and those on dev.

@MaikuB
Copy link
Contributor
MaikuB commented Feb 17, 2021

Unfortunately, this will not make it into the next stable release of Flutter but should be available in either the next dev release or the one after that.

Given the announcement at https://medium.com/dartlang/preparing-the-dart-and-flutter-ecosystem-for-null-safety-e550ce72c010 that is asking package authors to publish their null safety versions to stable, is this still the case?

I recently filed an issue on the device_info plugin at #76194 where it looks like the null safety migration isn't complete. Example app wasn't opted into null safety. This would've caught the issue where null values are sent from Android/iOS via the platform channel and the Dart code has been written to expect non-null values. What concerns me is after doing that, switching to dev channel and updating the integration_test to reference the SDK, the integration tests via flutter driver still passed

@stuartmorgan-g
Copy link
Contributor

Example app wasn't opted into null safety. This would've caught [...]

There's a sweep that just started recently over flutter/plugins to make sure all the examples are migrated and run in strong mode. Migrating the example apps themselves isn't actually tied to integration_test support.

@MaikuB
Copy link
Contributor
MaikuB commented Feb 18, 2021

@stuartmorgan yes it is indeed but what I forgot to add was that even after migrating the example app, I noticed that integration test wouldn't crash due to issues in the plugin. I was hoping the integration test would catch the issue with the plugin but perhaps I've missed something here on how to get there integration test run in strong mode

@jlubeck
Copy link
Contributor
jlubeck commented Mar 3, 2021

@dnfield what's the proper way to use integration_tests now that it's part of the sdk?
Do we still need to add it inside dev_dependencies?

As that is still importing the non null-safety version 1.0.2+2

Thank you!

@stuartmorgan-g
Copy link
Contributor

@dnfield what's the proper way to use integration_tests now that it's part of the sdk?

See #71379 (comment) for the reference format.

@jlubeck
Copy link
Contributor
jlubeck commented Mar 4, 2021

Awesome thank you @stuartmorgan that worked and happy to confirm that the current dev channel has this available.

@bradyt
Copy link
bradyt commented Mar 13, 2021
edited
Loading

@stuartmorgan Would you know the best way to track when integration_test and/or flutter_driver would be available on beta? Is it reasonable to have an issue dedicated to that?

Is #77459 likely to get a ping when they're on beta?

@stuartmorgan-g
Copy link
Contributor

@stuartmorgan Would you know the best way to track when integration_test and/or flutter_driver would be available on beta?

When a 2.1.0-* version is released to beta.

Is it reasonable to have an issue dedicated to that?

Issues reflect the state of master, not release channels, so no.

Is #77459 likely to get a ping when they're on beta?

There is no mechanism for automatically pinging old bugs when their fixes reach other channels. Someone in the community is welcome to do so if they like.

@fzyzcjy
Copy link
Contributor
fzyzcjy commented May 13, 2021

Tests and NNBD are both very important. So we need to have tests as well as nnbd (and a stable channel - since the app is in production). Is there any workaround, or we have to wait 3 months until the next stable release?

Thanks

@fzyzcjy
Copy link
Contributor
fzyzcjy commented May 13, 2021

In my case, the problem is not simply "the test code needs to be non-null-safe", but my whole app cannot work! :(

details: #82419 and StackOverflow

@tzvc
Copy link
tzvc commented May 14, 2021

Any updates on this? This is blocking

@jmagman
Copy link
Member
jmagman commented May 14, 2021

This is available on the beta channel and will be in the next stable release.

@enri90
Copy link
enri90 commented Jul 21, 2021

Error: Cannot run with sound null safety, because the following dependencies
don't support null safety:

  • package:integration_test

For solutions, see https://dart.dev/go/unsound-null-safety

:( :(

@dnfield
Copy link
Contributor
dnfield commented Jul 21, 2021

Nullsafe integration_test is available on the stable channel - please upgrade if you're still seeing this.

@github-actions
Copy link
github-actions bot commented Aug 4, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2021
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: null-safety Support for Dart's null safety feature a: tests "flutter test", flutter_test, or one of our tests c: proposal A detailed proposal for a change to Flutter dependency: dart Dart team may need to help us f: integration_test The flutter/packages/integration_test plugin P1 High-priority issues at the top of the work list package flutter/packages repository. See also p: labels. r: fixed Issue is closed as already fixed in a newer version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

0