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

[java] Improve resilience to broken classpath #3270

Merged
merged 13 commits into from
May 13, 2021

Conversation

oowekyala
Copy link
Member

Describe the PR

Relax some of the checks on well-formed types in the type resolution codebase. There will probably be bugs left since everything was written assuming all types are well formed.

This should fix the 400+ AssertionErrors of the regression tester on spring sources (its classpath is incomplete, and we should also fix it in our project-list.xml)

Related issues

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)

@oowekyala oowekyala added this to the 7.0.0 milestone May 7, 2021
previously this test was ill-posed. We had an unresolved List type,
and also, had a type param <S extends List<S>> which is an unsatisfiable
recursive bound.
@pmd-test
Copy link

pmd-test commented May 7, 2021

2 Messages
📖 Compared to pmd/7.0.x:
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
📖 Compared to master:
This changeset changes 9435 violations,
introduces 8234 new violations, 9 new errors and 0 new configuration errors,
removes 16078 violations, 10 errors and 2 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 0 violations,
introduces 365 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 965 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 9265 violations,
introduces 8794 new violations, 12 new errors and 0 new configuration errors,
removes 48949 violations, 25 errors and 2 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 0 violations,
introduces 365 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 965 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 9265 violations,
introduces 8828 new violations, 12 new errors and 0 new configuration errors,
removes 48899 violations, 25 errors and 2 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 0 violations,
introduces 34146 new violations, 0 new errors and 0 new configuration errors,
removes 15 violations, 968 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 9403 violations,
introduces 9680 new violations, 9 new errors and 0 new configuration errors,
removes 15984 violations, 25 errors and 2 configuration errors.
Full report
Compared to pmd/7.0.x:
This changeset changes 0 violations,
introduces 34146 new violations, 0 new errors and 0 new configuration errors,
removes 15 violations, 968 errors and 0 configuration errors.
Full report
Compared to master:
This changeset changes 9403 violations,
introduces 9680 new violations, 9 new errors and 0 new configuration errors,
removes 15984 violations, 25 errors and 2 configuration errors.
Full report

Generated by 🚫 Danger

import net.sourceforge.pmd.lang.java.symbols.internal.asm.Classpath;

/**
* For this test we exclude SuperItf.class from the {@link Classpath}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea 👍

Copy link
Member

@adangel adangel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for future reference: In the regression tester output, it is visible that the errors are removed (for spring, there were 965 errors). So this PR works.
In the latest report, these errors don't appear anymore as removed, because #3269 fixed the classpath issue for the regression tester. This means, that the classpath is now complete again.

@adangel adangel merged commit 5b814aa into pmd:pmd/7.0.x May 13, 2021
@oowekyala oowekyala deleted the java-classpath-resilience branch May 13, 2021 10:24
@adangel adangel mentioned this pull request Jan 23, 2023
55 tasks
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.

3 participants