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

CP-2145 Uncaught Error: Exception: Coverage formatting failed. #50

Closed
rayk opened this issue Aug 25, 2015 · 3 comments
Closed

CP-2145 Uncaught Error: Exception: Coverage formatting failed. #50

rayk opened this issue Aug 25, 2015 · 3 comments

Comments

@rayk
Copy link

rayk commented Aug 25, 2015

Guys love the idea of ddev... Hopefully by endless grinder task can go away..

Anyhow run into this problem

ddev coverage

::: Collecting coverage

    Running test suite test/cxs_store_test.dart
    dart --observe=56484 test/cxs_store_test.dart

        Observatory listening on http://127.0.0.1:56484
        00:00 +0: A group of tests First Test
        00:00 +1: All tests passed!

    Collecting coverage for test/cxs_store_test.dart
    pub run coverage:collect_coverage --port=56484 -o coverage/collection/test/cxs_store_test.dart.json
    Formatting coverage
    pub run coverage:format_coverage -l --package-root=packages -i coverage/coverage.json -o coverage/coverage.lcov --verbose --report-on=lib/


        Provided package root "packages" is not directory.

        Usage: dart format_coverage.dart [OPTION...]

        -s, --sdk-root        path to the SDK root
        -p, --package-root    path to the package root
        -i, --in              input(s): may be file or directory
        -o, --out             output: may be file or stdout
                              (defaults to "stdout")

            --report-on       which directories or files to report coverage on
        -j, --workers         number of workers
                              (defaults to "1")

        -r, --pretty-print    convert coverage data to pretty print format
        -l, --lcov            convert coverage data to lcov format
        -v, --verbose         verbose output
        -h, --help            show this help
    Coverage formatting failed. Could not generate coverage/coverage.lcov
Unhandled exception:
Uncaught Error: Exception: Coverage formatting failed. Could not generate coverage/coverage.lcov
Stack Trace:
#0      CoverageTask._format.<_format_async_body> (package:dart_dev/src/tasks/coverage/api.dart:280:7)
dart-lang/coverage#1      _RootZone.runUnary (dart:async/zone.dart:1166)
dart-lang/coverage#2      _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:494)
dart-lang/coverage#3      _Future._propagateToListeners (dart:async/future_impl.dart:577)
dart-lang/coverage#4      _Future._completeWithValue (dart:async/future_impl.dart:368)
dart-lang/coverage#5      _Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:422)
dart-lang/coverage#6      _microtaskLoop (dart:async/schedule_microtask.dart:43)
dart-lang/tools#534      _microtaskLoopEntry (dart:async/schedule_microtask.dart:52)
dart-lang/tools#535      _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
dart-lang/tools#536      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)

#0      _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:895)
dart-lang/coverage#1      _microtaskLoop (dart:async/schedule_microtask.dart:43)
dart-lang/coverage#2      _microtaskLoopEntry (dart:async/schedule_microtask.dart:52)
dart-lang/coverage#3      _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:96)
dart-lang/coverage#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:149)

Dart Version

Dart VM version: 1.12.0-dev.5.9 (Mon Aug 24 03:56:54 2015) on "macos_x64"

Description

I can make this happen consistently, if you use stagehand to set a package-simple project. You will certain hit the problem.

Thanks in advance and keep the work... Just need a way to run dart_doc now.

@evanweible-wf
Copy link
Contributor

Looks like this is because dart 1.12 removes the packages directory in favor of a single .packages file in the root. The coverage package uses a --package-root option for the format task. I'll investigate if omitting that option altogether fixes the problem for projects with the newer packages format, but it may require a change to the coverage package as well.

I've got an issue open for running dart_doc - you can follow it here: dart-archive/coverage#26

Thanks for interest in the project @rayk and keep the feedback coming!

@evanweible-wf
Copy link
Contributor

At this point I don't think there's anything we can do since 1.12 hasn't hit stable yet and the dependencies we use to run tests and coverage don't support it yet, either. I've opened an issue with the coverage package (dart-lang/tools#561) and there is already an issue open with the test package (dart-lang/test#327). I'll update this issue as things progress.

@evanweible-wf evanweible-wf modified the milestone: 1.0.1 Sep 2, 2015
@evanweible-wf
Copy link
Contributor

Coverage works with Dart 1.12 as long as you're not using the --no-package-symlinks flag with pub. I'm keeping this issue open until dart-lang/tools#561 is resolved and I can confirm that this works even when using --no-package-symlinks, but I'm removing it from the 1.0.1 milestone since there's nothing to do at this moment.

@evanweible-wf evanweible-wf removed this from the 1.0.1 milestone Sep 3, 2015
@charliekump-wf charliekump-wf changed the title Uncaught Error: Exception: Coverage formatting failed. CP-2145 Uncaught Error: Exception: Coverage formatting failed. Jul 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants