Closed domesticmouse closed 2 years ago
/cc @kevmoo for visibility
I changed "CpuSamplesEvent" to "var" and it worked fine. But it's only a temporary solution.
I'm on Dart stable (2.15.1 on "linux_x64") and I'm experiencing the same issue.
It seems to be related to https://github.com/dart-lang/sdk/issues/47978
Unfortunately webdev is picking up dds 2.1.6+2 which is not working and not dds 2.1.7 due to some depencency conflict.
Resolving dependencies...
Because webdev depends on dds ^2.1.7 which depends on vm_service ^8.1.0, vm_service ^8.1.0 is required.
So, because webdev depends on vm_service >=3.0.0 <8.0.0, version solving failed.
One temporary workaround if you encounter the issue using webdev as @alvarogfn suggested: edit ~/.pub-cache/hosted/pub.dartlang.org/dds-2.1.6+2/lib/src/cpu_samples_manager.dart
line 73 and change:
void cacheSamples(CpuSamplesEvent samples) {
to
void cacheSamples(dynamic samples) {
and run
dart pub global deactivate webdev
dart pub global activate webdev
to force recompilation.
It's also possible to activate a specific version of webdev
. The highest version that work for me was 2.7.4
dart pub global activate webdev 2.7.4
@bkonyi - was dds
published with an invalid constraint?
@bkonyi - was
dds
published with an invalid constraint?
Yes, but 2.1.6+2 and 2.1.7 was supposed to resolve the issues.
A republish with narrow constraints doesn't always solve the problem when a package was published with too wide constraints. The wide constraints version will get chosen for any solves where the narrow one would be ruled out, so the new package does fix existing bad solves. We could consider a republish with a newer version number and the old code, but I don't know if that will cause other problems.
In this case I think we can either revoke the versions of dds
with invalid constraints, or we could get a version of webdev
published with constraints that allow the newest vm_service
. I'm not sure if anyone with permissions/knowledge to revoke packages is around, most folks are out.
Getting a compatible version published is not trivial, it is not sufficient to widen the local constraints on vm_service
. devtools
version 2.8.0
depends on the older vm_service
, and there is no published version that allows the vm_service
compatible with the published versions of dds
.
It's not clear the easiest way to make the constraints allow the latest vm_service
. Publishing a new devtools
would probably work, but that team is out as well.
There is a comment in the pubspec saying that we depend on devtools
because we expect devtools_shared
would have a dependency through to it anyway, but that doesn't make much sense to me. I don't know why we need that dep, but the folks who might have context on that are also out.
If we assume it's safe and remove that dependency, we'd need to publish both webdev
and dwds
with widened constraints on vm_service
. There are unpublished breaking changes in the repo for dwds
, I'm not sure if publishing now would interrupt any specific plans.
I suspect that this will have to wait until more people are back next year.
This is breaking our CI, unfortunately, on stable Dart 2.15.1. The workaround above isn't going to help much for CI.
To make matters worse, it seems webdev
2.7.4 does not work with Dart 2.15.1:
Installed executable webdev.
Warning: Executable "webdev" runs "bin/webdev.dart", which was not found in webdev.
Activated webdev 2.7.4.
$ webdev build
[SEVERE] Could not find a command named "/usr/lib/dart/bin/snapshots/pub.dart.snapshot".
@mnordine If you're really desperate and you only need to build the website, I think you can manually invoke build_runner
as I think this is what webdev
does under the hood, e.g. dart run build_runner build -o web:build
. I forgot the exact command but it should be something similar to that.
There is a comment in the pubspec saying that we depend on
devtools
because we expectdevtools_shared
would have a dependency through to it anyway, but that doesn't make much sense to me. I don't know why we need that dep, but the folks who might have context on that are also out.If we assume it's safe and remove that dependency, we'd need to publish both
webdev
anddwds
with widened constraints onvm_service
. There are unpublished breaking changes in the repo fordwds
, I'm not sure if publishing now would interrupt any specific plans.I suspect that this will have to wait until more people are back next year.
Unfortunately, I think this assumption does hold. The devtools binaries are shipped in the devtools
package under the build
directory in the root of the package, and devtools_server
needs that directory to serve the application. dwds
still relies on this to launch DevTools, but we should move to using the DevTools bundled with the SDK now that we're not publishing new versions through pub.
+1 that dwds
should switch to launching DevTools from the Dart SDK. Then perhaps the devtools
and devtools_server
deps can be removed all together. Nonetheless, I did publish devtools 2.9.3 on pub, which has the bumped constraints for vm_service and dds (https://github.com/flutter/devtools/pull/3545). This was to fix a retracted publish of 2.9.2 that users on old SDKs were still pulling down, but also should help unblock this problem.
I've also published dds
version 2.1.6+3
. Using a 2.1.4
SDK to test, this seems to be resolved:
$ xcodebuild/DebugX64/dart-sdk/bin/dart --version
Dart SDK version: 2.14.0 (stable) (Mon Sep 6 13:47:59 2021 +0200) on "macos_x64"
$ xcodebuild/DebugX64/dart-sdk/bin/dart pub global activate webdev
Resolving dependencies... (1.7s)
+ args 2.3.0
+ async 2.8.2
+ browser_launcher 1.0.0
+ build_daemon 3.0.1
+ built_collection 5.1.1
+ built_value 8.1.3
+ charcode 1.3.1
+ checked_yaml 2.0.1
+ clock 1.1.0
+ collection 1.15.0
+ convert 3.0.1
+ crypto 3.0.1
+ dds 2.1.6+3 (2.1.7 available)
+ devtools 2.8.0 (2.9.3 available)
+ devtools_server 2.8.0 (2.9.3 available)
+ devtools_shared 2.8.0 (2.9.3 available)
+ dwds 11.5.0 (11.5.1 available)
+ fixnum 1.0.0
+ http 0.13.4
+ http_multi_server 3.0.1
+ http_parser 4.0.0
+ intl 0.17.0
+ io 1.0.3
+ json_annotation 4.4.0
+ json_rpc_2 3.0.1
+ logging 1.0.2
+ meta 1.7.0
+ mime 1.0.1
+ package_config 2.0.2
+ path 1.8.1
+ pedantic 1.11.1 (discontinued replaced by lints)
+ pool 1.5.0
+ pub_semver 2.1.0
+ pubspec_parse 1.2.0
+ shelf 1.2.0
+ shelf_packages_handler 3.0.0
+ shelf_proxy 1.0.1
+ shelf_static 1.1.0
+ shelf_web_socket 1.0.1
+ source_maps 0.10.10
+ source_span 1.8.1
+ sse 4.1.0
+ stack_trace 1.10.0
+ stream_channel 2.1.0
+ stream_transform 2.0.0
+ string_scanner 1.1.0
+ term_glyph 1.2.0
+ typed_data 1.3.0
+ usage 4.0.2
+ uuid 3.0.5
+ vm_service 7.5.0 (8.1.0 available)
+ watcher 1.0.1
+ web_socket_channel 2.1.0
+ webdev 2.7.6 (2.7.7 available)
+ webkit_inspection_protocol 1.0.0
+ yaml 3.1.0
Building package executables... (3.7s)
Built webdev:webdev.
Installed executable webdev.
Activated webdev 2.7.6.
Thanks for being patient everyone!
Attempting to activate webdev:
Flutter / dart version info: