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

[apex] Update to apexlink #4528

Merged
merged 6 commits into from
Jun 26, 2023
Merged

[apex] Update to apexlink #4528

merged 6 commits into from
Jun 26, 2023

Conversation

nawforce
Copy link
Contributor

Describe the PR

Updates apexlink dependency in pmd-apex. This currently updates apexlink to 2.3.5 but is showing a conflict with ANTLR runtime versions, 4.8 vs 4.9.1 which results in a failing test. This will need to be resolved upstream but I thought I would open the PR to show progress on the update. Once we have updated libraries using ANTLR 4.9.1 we should be able to update to latest.

Related issues

  • Fixes #

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)

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.

Thanks. I'll try to merge it soon.

@@ -63,6 +63,8 @@ void testWellFormedSfdxProjectJsonProducesFunctionalAnalysis() throws Exception

assertFalse(analysisInstance.isFailed());
});

// TODO: This is failing due to ANTLR versions, 4.9.1 vs 4.8, expect to resolve with apex-dev-tools switch
Copy link
Member

Choose a reason for hiding this comment

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

That's the reason, why the build is failing - I wonder, why this only now fails, since I see these mismatch antlr versions for a while now...

for reference, these are the messages on stderr:

ANTLR Tool version 4.8 used for code generation does not match the current runtime version 4.9.1
ANTLR Runtime version 4.8 used for parser compilation does not match the current runtime version 4.9.1
ANTLR Tool version 4.8 used for code generation does not match the current runtime version 4.9.1
ANTLR Runtime version 4.8 used for parser compilation does not match the current runtime version 4.9.1

Copy link
Member

Choose a reason for hiding this comment

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

ok, I understand now, why this test fails only now: Before we initialized Org for every run regardless whether it was a sdfx project. The messages were printed, but for another test already. The messages are printed only once (static initializer in ApexParser).

Now we initialize Org only for sfdx projects and this test case is the first time this is done and therefore the messages are printed there.

I'll keep the TODO but remove the messages from the log, so that the test works.

@adangel adangel added this to the 7.0.0 milestone Jun 26, 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

@adangel adangel merged commit 2f36868 into pmd:master Jun 26, 2023
3 checks passed
@nawforce
Copy link
Contributor Author

Thanks for tidying this up. I will get the next update ready to go.

kohlschuetter pushed a commit to kohlschuetter/pmd that referenced this pull request Jul 2, 2023
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