Code Monkey home page Code Monkey logo

Comments (5)

marklagendijk avatar marklagendijk commented on August 15, 2024

Can you paste the full error output you get? Even with out of memory errors, it normally includes the line that caused the issue.

When you get an out of memory issue it is caused by either a big diff, a big coverage file or a combination of both.

You can try writing the diff to a file, to see how big it is: git diff develop...HEAD > develop.diff.

It may help to start with something simple. For example:

  1. Do a simple change in a file which you know is covered by tests.
  2. Do not commit. Instead just run git diff and verify that you see your change there.
  3. Call diff-test-coverage with this diff: git diff | diff-test-coverage ARGS. Make sure you execute the command from the root of your repository.

from diff-test-coverage.

andreroggeri avatar andreroggeri commented on August 15, 2024

This is the output that I get on the console. (I'll check the other points later!)

<--- Last few GCs --->

[8964:000002424A4F2570]    13235 ms: Mark-sweep 1218.1 (1271.6) -> 1218.1 (1271.6) MB, 1392.4 / 0.0 ms  allocation failure GC in old space requested
[8964:000002424A4F2570]    14681 ms: Mark-sweep 1218.1 (1271.6) -> 1218.1 (1240.6) MB, 1445.5 / 0.0 ms  last resort GC in old space requested
[8964:000002424A4F2570]    16159 ms: Mark-sweep 1218.1 (1240.6) -> 1218.1 (1240.6) MB, 1478.0 / 0.0 ms  last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 00000159E9A255E9 <JSObject>
    1: /* anonymous */(aka /* anonymous */) [C:\Users\andrerc\AppData\Roaming\npm\node_modules\@connectis\diff-test-coverage\node_modules\cobertura-parse\source\index.js:~31] [pc=0000007A25C4DF4D](this=000001710A4022D1 <undefined>,l=000000A934A11A51 <Object map = 000003C37108A869>)
    2: arguments adaptor frame: 3->1
    3: forEach(this=000000A934A09FA1 <JSArray[5]>)
    4: extractLcovStyleBr...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::DecodeWrite
 2: node_module_register
 3: v8::internal::FatalProcessOutOfMemory
 4: v8::internal::FatalProcessOutOfMemory
 5: v8::internal::Factory::NewUninitializedFixedArray
 6: v8::internal::WasmDebugInfo::SetupForTesting
 7: v8::internal::interpreter::BytecodeArrayRandomIterator::UpdateOffsetFromIndex
 8: 0000007A25A843C1

from diff-test-coverage.

marklagendijk avatar marklagendijk commented on August 15, 2024

Apparently the issue happens in cobertura-parse.
Do you have a very big coverage report?
How big is your project?
What are you using to generate the coverage report?

from diff-test-coverage.

andreroggeri avatar andreroggeri commented on August 15, 2024

The project has ~16000 lines and the coverage report is generated by the angular-cli
The cobertura xml file has almost 2MB.

I used the python version of this tool with success, but I would like to use a node version to avoid asking people to install node.

from diff-test-coverage.

marklagendijk avatar marklagendijk commented on August 15, 2024

Hmm, the size shouldn't be the problem.
However, I see that you are using Windows. Probably there are some issues related to that (at least the lcov not working).
So far I have only used it on Linux environments.

If I have the time, I will look into this, this weekend.

from diff-test-coverage.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.