question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Remove extra work when computing code coverage

See original GitHub issue

https://github.com/facebook/buck/commit/0cc8d5d6a9629b56f49dee41e9d2623058337380 introduced a performance degradation for projects that do not use the direct_to_jar spool mode when computing code coverage

Ideally, the classes dir can be used if it already exists to prevent unzipping for projects that output classes to the filesystem already.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
kageiitcommented, Jan 27, 2017

@tdrhq We are seeing an exception with the latest buck version

TESTS PASSED
Failed on step emma_report with an exception:
buck-out/bin/freight/freight-authentication/lib__src_release__classes does not exist
java.lang.IllegalStateException: buck-out/bin/freight/freight-authentication/lib__src_release__classes does not exist
	at com.google.common.base.Preconditions.checkState(Preconditions.java:444)
	at com.facebook.buck.jvm.java.GenerateCodeCoverageReportStep.populateClassesDir(GenerateCodeCoverageReportStep.java:189)
	at com.facebook.buck.jvm.java.GenerateCodeCoverageReportStep.execute(GenerateCodeCoverageReportStep.java:98)
	at com.facebook.buck.step.DefaultStepRunner.runStepForBuildTarget(DefaultStepRunner.java:47)
	at com.facebook.buck.cli.TestRunning.runTests(TestRunning.java:437)
	at com.facebook.buck.cli.TestCommand.runTestsInternal(TestCommand.java:316)
	at com.facebook.buck.cli.TestCommand.runWithoutHelp(TestCommand.java:580)
	at com.facebook.buck.cli.AbstractCommand.run(AbstractCommand.java:205)
	at com.facebook.buck.cli.BuckCommand.run(BuckCommand.java:91)
	at com.facebook.buck.cli.Main.runMainWithExitCode(Main.java:1287)
	at com.facebook.buck.cli.Main.runMainThenExit(Main.java:706)
	at com.facebook.buck.cli.Main.main(Main.java:1884)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.facebook.buck.cli.bootstrapper.ClassLoaderBootstrapper.main(ClassLoaderBootstrapper.java:62)
0reactions
felipecslcommented, May 15, 2017

This seems to be fixed with jar_spool_mode = direct_to_jar in the buckconfig file

Read more comments on GitHub >

github_iconTop Results From Across the Web

Code coverage testing - Visual Studio (Windows)
Learn how to use the code coverage feature of Visual Studio to determine what proportion of your project code is being tested by...
Read more >
Improve Code Quality Using Test Coverage - CODE Magazine
In this article, I'll introduce the concept of code coverage by exploring the value of measurements such as statement coverage, ...
Read more >
Code Coverage Tutorial: Branch, Statement, Decision, FSM
Branch coverage method removes issues which happen because of statement coverage testing; Allows you to find those areas which are not tested by ......
Read more >
How do I increase my code coverage, or why can't I cover ...
1 Answer 1 ... Code coverage is a measurement of how many unique lines of your code are executed while the automated tests...
Read more >
Clear code coverage information in IntelliJ - Stack Overflow
just close the coverage window with "x" button: closing window. update: for the recent IntelliJ IDEA 2018.2.x, you can hide coverage by clicking...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found