-
Notifications
You must be signed in to change notification settings - Fork 229
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
"Error: The non-abstract class '_StaticTypeImpl' is missing implementations" #4406
Comments
Same here |
Have it as well when using localizely/intl_utils. Flutter 3.24.0 • channel stable • https://github.com/flutter/flutter.git |
Same here |
Same issue |
flutter doctor -v [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0-rc1) [✓] Xcode - develop for iOS and macOS (Xcode 15.4) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.2) [✓] VS Code (version 1.85.1) [✓] Connected device (5 available) [✓] Network resources • No issues found! |
I think to use Flutter from |
In my case, I was able to fix the issue by activating a global package again:
|
Ah, yeah globally activated tools are an interesting use case... they probably do need to be re-activated to pick up versions that are compatible with the current SDK. |
For me, the issue got solved when I cleared the cache with |
|
cc @sigurdm @jonasfj just for FYI, I am not sure if there is something reasonable for pub to do here or not. Basically though, the case here is that the previous version solve for a globally activated package is no longer valid on the new SDK. Should globally activated packages re-validate their solve whenever the SDK is updated? I think that SDK constraints probably won't be respected in this case either? |
Yes, and no, people could have multiple SDKs installed. I think today we actually delete the old snapshot and create a new snapshot. I think, we do generally want to rethink globally activated packages, so that we just install a precompiled executable. It's less smart, there is no |
Transferred this to the pub repo because I do think that is the correct place for it, the packages can't do anything here. Feel free to do with it as you please though, up to and including closing it as working as intended. |
Yeah - we should do something here. I'm assuming that the new analyzer version had valid constraints, and the global run failed to validate them. edit: see next comment. This is probably not the way to go.
|
Thinking again we can do something simpler without sacrificing the fast path. The sdk should recognize that the snapshot is not valid, and return a specific error code.
|
Hmm .. seems we are already validating the sdk constraints: pub/lib/src/global_packages.dart Line 402 in d86e3c9
Not sure what is going wrong here then. |
I can reproduce this with: $ flutter channel stable && flutter upgrade --force
[...]
$ flutter --version
Flutter 3.24.3 • channel stable • https://github.com/flutter/flutter
Framework • revision 2663184aa7 (4 weeks ago) • 2024-09-11 16:27:48 -0500
Engine • revision 36335019a8
Tools • Dart 3.5.3 • DevTools 2.37.3
$ flutter pub global activate intl_utils
[...]
Activated intl_utils 2.8.7.
$ cat ~/.pub-cache/global_packages/intl_utils/pubspec.lock
[...]
sdks:
dart: ">=3.4.0 <4.0.0"
$ flutter channel stable && flutter upgrade --force
[...]
$ flutter --version
Flutter 3.26.0-1.0.pre.397 • channel master • https://github.com/flutter/flutter
Framework • revision e695cd6e9a (2 hours ago) • 2024-10-08 10:41:09 +0200
Engine • revision 7e8011f3cc
Tools • Dart 3.6.0 (build 3.6.0-330.0.dev) • DevTools 2.40.0
$ flutter pub global run intl_utils:generate
Building package executable... (3.6s)
Failed to build intl_utils:generate:
../../.pub-cache/hosted/pub.dev/analyzer-6.8.0/lib/src/summary2/macro_declarations.dart:57:3: Error: The implicitly called unnamed constructor from 'ConstructorDeclarationImpl' has required parameters. So it seems like checking the sdk constraint is not enough in this case. |
Yeah, the issue isn't actually the SDK constraint it's the If this is an issue only created by SDK vendored packages, it might matter less.... although it might be an issue for flutter packages also? |
Flutter packages cannot be |
This was fixed (or at least has a better error message) in #4410 |
Thanks! Although the issue number you cited seems unrelated. |
Hmm - I think it is the right one. Now instead of getting "Error: The non-abstract class '_StaticTypeImpl' is missing implementations" when doing |
I just switched to the
master
channel of Flutter, and a project that uses the analyzer as a library (Serverpod) reports this error:The text was updated successfully, but these errors were encountered: