grammars-v4 icon indicating copy to clipboard operation
grammars-v4 copied to clipboard

[protobuf3] pom.xml is incorrect for files to test with generated parser.

Open kaby76 opened this issue 3 months ago • 1 comments

As noted in another conversation (https://github.com/antlr/grammars-v4/pull/4632#issuecomment-3337788036), the files tested in the old Antlr Maven Tester is incorrect:

https://github.com/antlr/grammars-v4/blob/6b517735620223475eefaa85c92f8d6bce15f360/protobuf/protobuf3/pom.xml#L44

That does not correspond to that tested with the newer (all OS/all targets/all generators) tester.

https://github.com/antlr/grammars-v4/blob/6b517735620223475eefaa85c92f8d6bce15f360/protobuf/protobuf3/desc.xml#L8

kaby76 avatar Sep 26 '25 11:09 kaby76

I now remember why I punted on making <exampleFiles></exampleFiles> an empty element. This is because the Antlr Maven tester so old that it cannot test only the files examples/*.proto. By default, the code recursively looks for all files, filtering out those that have the improper extension. https://github.com/antlr/antlr4test-maven-plugin/blob/fbba99e1ecebe03681e1269a0a1fba95f75550c3/src/main/java/com/khubla/antlr/antlr4test/ScenarioExecutor.java#L218

I specifically left some .proto files that are "proto2" syntax with that extension. I would have to partition the tests to work around this problem with the tester code. The tester is no longer maintained, so I can't change the code.

kaby76 avatar Sep 26 '25 11:09 kaby76