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
The Compiler is broken when using mockito unit testing #24493
Comments
I can't repro the crash with the file provided. Can you try running
|
Thank you very much for the reply. Adding --checked parameter produced identical output. I was able to narrow the issue down to combination of mockito and stagexl libraries. The pubspec file is
UnitTest file that causes the crash:
In this example, instantiating a mock for AReactView or TestThis() one at a time works fine. Only when creating the two instances together does the crash occurs. |
Thanks, I was able to repro the crash on my machine with the provided files. When I run in checked mode I get this crash:
|
most likely becuase mockito is marking everything as retained by mirrors, we might be hitting a corner case on the frequency namer. @herhut-ggl - maybe you have a quick clue of what could be happening here? From what I could see this happens on a type variable for Point#T (defined both in that package under geom/point.dart and in dart:core). @alextech - you might be able to work around this issue by using the @MirrorsUsed(targets: "MockReactView", override: "*")
import 'dart:mirrors'; |
I have a proposed fix in https://codereview.chromium.org/1394483002/. |
Compiler crashes when mocking a dependency with mockito 0.11 and test 0.12.4+9 on Windows 10. Compiler executed with pub.bat run test:test -p phantomjs
Unable to figure out how to fix. Unit test files looks like this but I am not sure if I stripped too much code for this report. Constructors are just as shown. I do not know where exactly to look for the issue at this point.
Crash report:
../../../../../AROMAN~1/AppData/Local/Temp/dart_test_64e139b1-694a-11e5-9bcf-5c260a791bae/runInBrowser.dart:
Warning:
****************************************************************
* WARNING: dart:mirrors support in dart2js is experimental,
* and not recommended.
* This implementation of mirrors is incomplete,
* and often greatly increases the size of the generated
* JavaScript code.
*
* Your app imports dart:mirrors via:
* test/views/MyComponentView_test.dart => package:mockito => dart:mirrors
*
* You can disable this message by using the --enable-experimental-mirrors
* command-line flag.
*
* To learn what to do next, please visit:
* http://dartlang.org/dart2js-reflection
****************************************************************
The text was updated successfully, but these errors were encountered: