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

Avoid SQL Server JDBC driver to load ANTLR parsers #27343

Merged
merged 1 commit into from
Aug 18, 2022

Conversation

Sanne
Copy link
Member

@Sanne Sanne commented Aug 17, 2022

In particular we need it to avoid loading ANTLR classes because it's using versions which are not aligned with our BOM.

Alternatively we could have pursued alignment, but it would need ongoing maintenance and ANTLR is being used by multiple significant projects.

When such a class is loaded, ANTLR detects the misalignment (even in a micro version) and needs to throw a fatal exception; we don't actually never need this parser, but it's dangerously initialized by the native image compiler.

N.B. it might look as if an integration test is missing, but that is why I included a @Delete directive for SQLServerLexer : it proofs that it is no longer reachable. The compilation would fail otherwise, if the other rules weren't doing what they are supposed to do. So we also have a regression test.

In particular we need it to avoid loading ANTLR classes because it's
using versions which are not aligned with our BOM.
Alternatively we could have pursued alignment, but it would need ongoing
maintenance and ANTLR is being used by multiple significant projects.
@Sanne
Copy link
Member Author

Sanne commented Aug 17, 2022

Marking for backport as it essentially follows up on #24010

@gsmet gsmet merged commit 8e467f5 into quarkusio:main Aug 18, 2022
@quarkus-bot quarkus-bot bot added this to the 2.13 - main milestone Aug 18, 2022
@Sanne Sanne deleted the MSSQL-no-ANTLR branch August 18, 2022 10:02
@gsmet gsmet modified the milestones: 2.13 - main, 2.12.0.Final Aug 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants