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

Upgrade apex-parser version to 4.0.0 #52

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

adangel
Copy link
Contributor

@adangel adangel commented Apr 4, 2024

This upgrades apex-parser to the new version and adjust to the grammar changes (trigger block)

This is not yet available in maven central (https://central.sonatype.com/artifact/io.github.apex-dev-tools/apex-parser/versions), so the build currently fails. I tested it locally.

This upgrade also contains a fix for typeof needed in pmd/pmd#4922 .

Note: For adapting to the trigger block changes, I naively put the body of the trigger in a List<Node>. I assume, the order is then the order how it is defined in the source, possibly mixed declarations and statements. The CompoundStatement is gone and with that also the scoping boundary... Not sure, if this is the best approach.

  • Tests pass
  • Appropriate changes to README are included in PR

@adangel
Copy link
Contributor Author

adangel commented Apr 5, 2024

@aaronhurst-google
apex-parser 4.0.0 is now in maven central - If you restart the CI build, it should be working now...

Copy link
Collaborator

@aaronhurst-google aaronhurst-google left a comment

Choose a reason for hiding this comment

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

LGTM

@aaronhurst-google
Copy link
Collaborator

Note: For adapting to the trigger block changes, I naively put the body of the trigger in a List. I assume, the order is then the order how it is defined in the source, possibly mixed declarations and statements. The CompoundStatement is gone and with that also the scoping boundary... Not sure, if this is the best approach.

For scope analysis, it would be very nice to be explicit about the boundaries. But this isn't lossy; the scope is still implied by the parent TriggerDeclaration. Just another case to handle. :)

@aaronhurst-google aaronhurst-google merged commit 9b981b1 into google:main Apr 16, 2024
2 checks passed
@adangel adangel deleted the bump-apex-parser-4.0.0 branch April 26, 2024 14:15
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

2 participants