8000 Mockito+Build are unusable at tip of tree (including in the Flutter SDK) · Issue #60566 · dart-lang/sdk · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Mockito+Build are unusable at tip of tree (including in the Flutter SDK) #60566

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
matanlurey opened this issue Apr 18, 2025 · 5 comments
Closed
Labels
P0 A serious issue requiring immediate resolution

Comments

@matanlurey
Copy link
Contributor

See flutter/flutter#167229 and https://github.com/dart-lang/build/tree/resolver-2-methods.

Flutter infra development requires manually hand-editing mocks, which is not sustainable.

############# build ###########
[INFO] Generating build script...
[INFO] Generating build script completed, took 445ms

[INFO] Precompiling build script......
[WARNING] ../../.pub-cache/hosted/pub.dev/mockito-5.4.5/lib/src/builder.dart:346:45: Error: The getter 'augmented' isn't defined for the class 'InterfaceElement'.
 - 'InterfaceElement' is from 'package:analyzer/dart/element/element.dart' ('../../.pub-cache/hosted/pub.dev/analyzer-7.4.0/lib/dart/element/element.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'augmented'.
        final toStringMethod = type.element.augmented
                                            ^^^^^^^^^
../../.pub-cache/hosted/pub.dev/mockito-5.4.5/lib/src/builder.dart:845:23: Error: The argument type 'InterfaceElement' can't be assigned to the parameter type 'InterfaceElementImpl'.
 - 'InterfaceElement' is from 'package:analyzer/dart/element/element.dart' ('../../.pub-cache/hosted/pub.dev/analyzer-7.4.0/lib/dart/element/element.dart').
 - 'InterfaceElementImpl' is from 'package:analyzer/src/dart/element/element.dart' ('../../.pub-cache/hosted/pub.dev/analyzer-7.4.0/lib/src/dart/element/element.dart').
        .getInterface(interfaceElement)
                      ^
@anisbouziane
Copy link

Here different error but same package

../../../.pub-cache/hosted/pub.dev/mockito-5.4.5/lib/src/builder.dart:1800:46: Error: The argument type 'InterfaceElement' can't be assigned to the parameter type 'InterfaceElementImpl'.
 - 'InterfaceElement' is from 'package:analyzer/dart/element/element.dart' ('../../../.pub-cache/hosted/pub.dev/analyzer-7.4.1/lib/dart/element/element.dart').
 - 'InterfaceElementImpl' is from 'package:analyzer/src/dart/element/element.dart' ('../../../.pub-cache/hosted/pub.dev/analyzer-7.4.1/lib/src/dart/element/element.dart').
          overriddenMethod.enclosingElement3 as InterfaceElement, name);
                                             ^
[INFO] Precompiling build script... completed, took 1.1s
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.

@bwilkerson
Copy link
Member

@scheglov @davidmorgan

@a-siva a-siva added the P0 A serious issue requiring immediate resolution label Apr 21, 2025
@a-siva
Copy link
Contributor
a-siva commented Apr 21, 2025

Marking issue as P0 as a P0 flutter issue is dependent on this.

@scheglov
Copy link
Contributor

@srawlins AFAIK owns Mockito.

@srawlins
Copy link
Member

flutter/flutter#167229 is resolved, I believe because with the release of mockito 5.4.6, mockito and build's latest releases are compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 A serious issue requiring immediate resolution
Projects
None yet
Development

No branches or pull requests

6 participants
0