[java] New Java XPath functions#2917
Conversation
Generated by 🚫 Danger |
Maybe the regression tester is not working yet for PRs against pmd/7.0.x? I'm still working through mails... |
|
Ok, re-running the workflow is only useful for temporary failed builds. It will re-run the builds with exactly the same git ref/sha, see https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/re-running-a-workflow:
If the base branch of a PR as advanced, that's not taken into consideration. The only way to rebuild seems to be a real push to the PR branch. Then a new pull_request event is created with an update git ref/sha. I've pushed another merge now, let's see, if the regression tester is running now correctly... Btw: the github ref/sha in pull requests is always the test merge commit created automatically by github. |
|
Isn't it fun? New error: I'm wondering, why this didn't appear in other builds yet? |
|
Rerun, now back at sourceforge failure: |
|
https://github.com/pmd/pmd/pull/2917/checks?check_run_id=1453031344#step:6:43193
Looks like it comes from this line (or L44). Are these calls really needed? It looks like the baseline would be downloaded within the |
adangel
left a comment
There was a problem hiding this comment.
Running pmdtester failed: #<NoMethodError: undefined method `download_baseline' for #Danger::Dangerfile:0x00005586ba34e8d8>
Looks like it comes from this line (or L44). Are these calls really needed? It looks like the baseline would be downloaded within the
Runner::runcall anyway
I've fixed that already, probably forgot to delete these lines when merging (ce99966)
I've pushed a small fixes commit to this PR, that should trigger the rebuild. The build of a PR happens always on a test merge commit that github automatically creates, so it should include the fix on pmd/7.0.x.
If then GH actions is happy and regression tester runs, I'll merge this PR.
| * qname ::= java binary name | ||
| * }</pre> | ||
| */ | ||
| public static final class InvocationMatcher { |
There was a problem hiding this comment.
It might be better, to have the class InvocationMatcher in a separate file instead in TypeTestUtil.... something we can consider later, though. It's new API, so we can still move it around.
| @Override | ||
| protected Class<?> parseArgument(String constantArg) throws XPathException { | ||
| try { | ||
| return Class.forName("net.sourceforge.pmd.lang.java.ast.AST" + constantArg); |
There was a problem hiding this comment.
This provides the "nodeIs" function for java. The issue #1787 describes this actually as a general, core function, available for all languages. I think, it would be not too hard to port this class + BaseRewrittenFunction to core. But IMHO we should wait with that for later.
Therefore I'll keep #1787 open, as it is only fixed for java.
I wonder, where these come from. These are all comment rules, that have been updated with #2802 ... |
Ah... it's one specific file: ReactorNettyTcpStompClientTests.java - previously, we had a parser error (java.lang.IllegalStateException: Disambiguation pass should resolve everything except qualified ctor calls) which is now solved... |
I was thinking that we could add some detection of this into pmd/pmd-regression-tester. We already detect "changed" violations. There could be "lost" violations, those that were deleted because of an error, and "recovered" violations, those that appeared because some error disappeared |
* Improve docs * Add missing tests for XPath functions * TypeIsFunction has been replaced with BaseContextNodeTestFun, so this deletes the file getCommentOn is still untested. I wonder whether we really need it, also, it's inefficient and not specified at all (because it's unused).
Describe the PR
These are changes extracted from #2899 for ease of reference, namely:
PmdXPathException, including failure in our custom functions (currently there's a mix of raw RuntimeException, IllegalArgumentException, IllegalStateException)matchesSignodeIs: refs [core] Match abstract types in XPath queries #1787hasAnnotation: refs [core] Match abstract types in XPath queries #1787modifiers,explicitModifiers: refs [java] AccessNode API changes #1307This should be merged before #2899, to reduce that PR's diff
Related issues
Ready?
./mvnw clean verifypasses (checked automatically by travis)