Skip to content

[apex] Update to apexlink#4528

Merged
adangel merged 6 commits into
pmd:masterfrom
nawforce:update-apexlink
Jun 26, 2023
Merged

[apex] Update to apexlink#4528
adangel merged 6 commits into
pmd:masterfrom
nawforce:update-apexlink

Conversation

@nawforce

Copy link
Copy Markdown
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)

@adangel adangel left a comment

Copy link
Copy Markdown
Member

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.

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
Copy Markdown
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
Copy Markdown
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
@ghost

ghost commented Jun 26, 2023

Copy link
Copy Markdown
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
@nawforce

Copy link
Copy Markdown
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.

2 participants