PoC: resolve patched ANTLR generator from the target platform (Maven Central)#1432
Draft
joaodinissf wants to merge 1 commit into
Draft
PoC: resolve patched ANTLR generator from the target platform (Maven Central)#1432joaodinissf wants to merge 1 commit into
joaodinissf wants to merge 1 commit into
Conversation
The Generate*.mwe2 grammar workflows need the patched ANTLR 3.2 generator (the org.antlr.Tool plus the itemis AntlrToolRunner that Xtext's AntlrToolFacade invokes). Today the launch classpath pulls this from a 1.4 MB binary jar committed to com.avaloq.tools.ddk.workflow (antlr-generator-3.2.0-patch.jar, added in dsldevkit#1308). That exact generator was donated to Eclipse and published on Maven Central years ago: org.eclipse.xtext:xtext-antlr-generator:2.1.1 is the toolrunner, and it pulls org.xtext:antlr-generator:3.2.1 - the fat patched-ANTLR-3.2 tool jar. So we can let the target platform provide it instead of hosting a binary or relying on the dead itemis p2 repository. This PoC adds a PDE/Tycho Maven location to ddk.target that brings both artifacts in as PDE-wrapped bundles (missingManifest=generate). It is purely additive - the committed jar is left in place so the branch stays green - and is meant for local verification: set ddk.target active, confirm the two generated bundles resolve, then (optionally) drop the lib entry from com.avaloq.tools.ddk.workflow/.classpath and re-run a Generate*.mwe2 to prove the generator now resolves from the target. If that holds, the follow-up is to remove the committed jar and its provenance note and rely solely on Maven Central. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Proof of concept: make the patched ANTLR 3.2 generator used by the
Generate*.mwe2grammar workflows resolvable from the target platform (Maven Central) instead of from the 1.4 MB binary jar committed tocom.avaloq.tools.ddk.workflowin #1308.Adds a single PDE/Tycho Maven location to
ddk-target/ddk.target:org.eclipse.xtext:xtext-antlr-generator:2.1.1— theAntlrToolRunnertoolrunner that Xtext'sAntlrToolFacadeinvokes.org.xtext:antlr-generator:3.2.1— the fat patched-ANTLR-3.2 tool jar (providesorg.antlr.Tool).PDE wraps both non-OSGi jars as bundles (
missingManifest="generate").includeDependencyDepth="none"keeps it from dragging in a second log4j.Why this is low risk / low complexity
The generator we currently host is this Maven artifact — I verified the committed
antlr-generator-3.2.0-patch.jaris itemis's patched ANTLR fat jar, andorg.eclipse.xtext:xtext-antlr-generator(donated to Eclipse, on Central since 2014) carries the identicalde.itemis.xtext.antlr.toolrunnerclasses and declares the fat jar as a transitive dependency. No repackaging, no building, no dead p2 repo — a declarative one-location target edit.How to test locally
ddk-target/ddk.targetas the active target platform; reload it.xtext-antlr-generator,antlr-generator) resolve in the target contents.<classpathentry kind="lib" path="antlr-generator-3.2.0-patch.jar"/>line fromcom.avaloq.tools.ddk.workflow/.classpathand re-run aGenerate*.mwe2launch to prove the generator now resolves from the target.Scope
Purely additive — the committed jar is left in place so the branch stays green. If local testing confirms the target route works, the follow-up removes the committed jar + its provenance note.
🤖 Generated with Claude Code