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

[core] Deal with errors from threads in multithreading mode #4612

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

adangel
Copy link
Member

@adangel adangel commented Jun 29, 2023

Describe the PR

If an error occurs in multithreading mode, PMD now rethrows this. Such errors indicate a serious problem like incomplete runtime classpath of PMD or other
VM error (out of memory) that shouldn't be swallowed.

When working on #4605 I once had an incomplete runtime classpath (I think guava was missing which jorje needs). The result was, that I didn't see any errors at all, even not with --debug. PMD ran fine, but Apex just didn't find anything yet. The fact, that no Apex violations were found was caught by the integration test. But it's not good, if an error is not printed at least to the console.

The solution in this PR is the most basic and could be improved it any thinkable way - but this change at least should be enough to see some errors.

Note: This is not about runtime exceptions or something like that - these are already collected in the report as processing errors.

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

If an error occurs in multithreading mode, PMD now
rethrows this. Such errors indicate a serious problem
like incomplete runtime classpath of PMD or other
VM error (out of memory) that shouldn't be swallowed.
@adangel adangel added this to the 7.0.0 milestone Jun 29, 2023
@pmd-test
Copy link

1 Message
📖 Compared to master:
This changeset changes 0 violations,
introduces 0 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 0 errors and 0 configuration errors.
Full report

Generated by 🚫 Danger

@jsotuyod jsotuyod merged commit a768230 into pmd:master Oct 19, 2023
3 checks passed
@adangel adangel deleted the multithreading-errors branch October 20, 2023 09:02
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.

None yet

3 participants