Skip to content
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

DevTools extension are not buildable with latest Flutter/Dart #882

Open
Sameri11 opened this issue Jul 21, 2024 · 0 comments · May be fixed by #891
Open

DevTools extension are not buildable with latest Flutter/Dart #882

Sameri11 opened this issue Jul 21, 2024 · 0 comments · May be fixed by #891
Assignees
Labels
bug Something isn't working

Comments

@Sameri11
Copy link

Describe the bug
Hi!

I was interested in proceeding work on #868 to improve DevTools extension.

Here is my dev environment:

OS: macOS 14.3.1
Flutter: 3.22.2
Dart: 3.4.3
DevTools: 2.34.3

Dependencies of extension (which are rapidly developing as I see) needed to be updated because:

  1. vm_service version range is too restrictive and dependency resolution failed:
Because every version of integration_test from sdk depends on vm_service 14.2.1 and provider_devtools_extension depends on vm_service >=11.9.0 <14.0.0, integration_test from sdk is forbidden.
So, because provider_devtools_extension depends on integration_test from sdk, version solving failed.
  1. devtools_app_shared is outdated a bit and breaks tests. (Link)

...And couple other issues I experienced during updating:

  1. Seems like this deprecation broke somehow backward compatibility and now it's plugin's responsibility to check connection, at least in "development" (with simulated_chrome_environment option)

I will provide my fork with all these updates a little bit later in this issue since it's kinda horrible at the moment and can not be merged in any way. But it could be handy with reproducing next issue, which is most problematic I think.

Because of obligatory update of vm_service to 14.2.1 and up, core logic of instance_providers.dart breaks with a lot of null-related issues (because there is a lot of force-unwraps).
If comment all _parseFields and just use empty lists, there are no exceptions. But no useful info in devtools too, of course, since no fields obtained from VM.

To Reproduce

  1. Clone my fork on branch null-exceptions, Link
  2. Run example app (provider/packages/provider/example). You will get log like this:
...
A Dart VM Service on Chrome is available at: http://127.0.0.1:53606/jatJWHd2X30=
The Flutter DevTools debugger and profiler on Chrome is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:53606/jatJWHd2X30=
...

Obtain VM address from this log (in this case – http://127.0.0.1:53606/jatJWHd2X30=)
3. Run extension example with --dart-define=use_simulated_environment=true as described here
4. Connect to Dart VM from step 2 in upper-right corner (Dart VM service connection)
5. Check error in Logs tab

Expected behavior

I was expecting instance_providers.dart to work with updated vm_service and updated VM service protocol

@Sameri11 Sameri11 added bug Something isn't working needs triage labels Jul 21, 2024
@Sameri11 Sameri11 linked a pull request Sep 24, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants