Skip to content

ignore nil branches during parallel combine#1081

Open
shixianyangidme wants to merge 1 commit intosimplecov-ruby:mainfrom
shixianyangidme:main
Open

ignore nil branches during parallel combine#1081
shixianyangidme wants to merge 1 commit intosimplecov-ruby:mainfrom
shixianyangidme:main

Conversation

@shixianyangidme
Copy link

This issue had very similar cause of another pending PR: , but it is caused by parallel test. My project is based on ruby 3.1.4
If a parallel test (2 processes) generates two results on the same file:
Result A
"/Users/shixian.yang/workspace/test.rb": { "lines": [ 1, 1, null ] },
Result B
"/Users/shixian.yang/workspace/test.rb": { "lines": [ 0, 0, null ] },
Neither of results have "branches", the merge will generate a "branches": nil as a result. Finally it ends up in the error
NoMethodError: undefined method `flat_map' for nil:NilClass.

My plan is to ignore the "branches" field if neither A and B have "branches" exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments