refactor: migrate Xtend to Java - com.avaloq.tools.ddk.xtext.test.core (Tag) - #1423
Merged
joaodinissf merged 3 commits intoAug 26, 2026
Merged
Conversation
rubenporras
previously approved these changes
Jun 16, 2026
rubenporras
left a comment
Member
There was a problem hiding this comment.
I think we can do this if we want to finally get rid of Xtend. Alternatively, if we accept that downstream projects can also migrate away from xtend, they should use com.avaloq.tools.ddk.xtext.test.TagExtension, which I introduced for that purpose. Because this will likely take same time I think this PR makes sense.
…e (Tag) DRAFT CHECKPOINT - DO NOT MERGE until the active-annotation question is resolved. Converts the Tag active annotation (@Active(TagCompilationParticipant)) from Xtend to Java, keeping @Active + the processor + org.eclipse.xtext.xtend.lib, and removes the module's Xtend build infrastructure (.classpath, .project, build.properties, xtend-gen). Local gate (-DskipTests) is green. BLOCKED: Tag is an Xtend active annotation whose macro assigns each @tag field a unique integer at Xtend-compile time. DDK declares no @tag fields itself (the consumers are downstream), so DDK CI cannot validate that the macro still fires for a Java-authored @interface. See the PR description for the resolution plan. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…line) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
joaodinissf
force-pushed
the
migrate/xtend-to-java/xtext-test-core
branch
from
August 25, 2026 10:32
679ef70 to
fcd95f4
Compare
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
joaodinissf
added a commit
to joaodinissf/dsl-devkit
that referenced
this pull request
Aug 25, 2026
…ed work This PR is the migration tracker: as per-module migrations land on master through dedicated PRs, their counterparts here are dropped, shrinking this PR until it is empty and can be closed. Dropped in this rebase (master wins): - com.avaloq.tools.ddk.check.core/**: migration fully landed on master (fd18e86..30ff3e0 polish series; no .xtend remains there) - com.avaloq.tools.ddk.xtext.{export,expression,scope}/**: superseded by the dsldevkit#1405 Xbase rework (2973c5b); the conversions here predated it - ddk-parent/pom.xml: global xtend-maven-plugin removal was premature (master still carries .xtend sources) Kept (not yet landed via dedicated PRs): xtext.test.core Tag conversion (pending dsldevkit#1423), .ide/.ui/generator Xtend build-infra cleanups, migration docs and configuration. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
rubenporras
approved these changes
Aug 25, 2026
rubenporras
reviewed
Aug 25, 2026
joaodinissf
marked this pull request as ready for review
August 25, 2026 23:48
rubenporras
approved these changes
Aug 26, 2026
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
Converts
Tag— the last.xtendfile incom.avaloq.tools.ddk.xtext.test.core— from Xtend to Java, keeping@Active(TagCompilationParticipant.class)+@Retention(RUNTIME)and theorg.eclipse.xtend.libMANIFEST dependency, and removes the module's Xtend build infrastructure (.classpath/.project/build.properties/xtend-gen). Also bumps the bundle to17.3.2(MANIFEST + pom), since its content changes relative to the published 19.0.0 baseline and the revivedcompare-version-with-baselinesgate would otherwise reject it.Why this was parked, and why it is unblocked now
Tagis an Xtend active annotation:TagCompilationParticipantruns at Xtend-compile time and auto-assigns each@Tagfield a unique int (fromCOUNTER_BASE = 10000). DDK declares no@Tagfields itself — the consumers are closed-source downstream repos — so this CI could not directly prove the macro still fires onceTagis a Java@interface. The PR was therefore held as a blocked draft.That question has now been answered by a dedicated multi-agent validation (2026-08-25):
Tag.javafrom this PR, compiled with plainjavac21 againstorg.eclipse.xtend.lib.macro2.43.0, produces aTag.classbyte-for-byte identical (SHA-2561a9b1ec375fc5a9348112ae478eb3eb8e1ff62876f557d6622c30ff4be04c71c) to the Xtend-pipeline-compiledTag.classshipped in the released bundlecom.avaloq.tools.ddk.xtext.test.core_17.3.1.v20260713-0816.jar(whose Xtend provenance is proven by its source jar containingTag.xtend, the xtend-genTag.java, and the._tracefile). A downstream Xtend compiler consuming the bundle jar receives literally the same bytes — provenance is indistinguishable for any Xtend version. The only source-level delta is the Xtend-emitted@SuppressWarnings("all"), which has SOURCE retention and leaves no bytecode trace.XtendBatchCompiler2.43.0 compiled a consumer.xtenddeclaring@Tagfields with only the javac-compiledTag/TagCompilationParticipanton the classpath: the active annotation fired and injected10000/10001/10002exactly as before.XAnnotationExtensions.isActiveAnnotation/getProcessorType) operates purely onJvmAnnotationType— the JVM type model, populated identically from Xtend source, Java source, or classpath bytecode. This is the same mechanism by whichorg.eclipse.xtend.lib's own@Data/@Accessorswork: that jar ships only.classfiles.Note on
known-pitfalls.md.agents/skills/xtend-to-java/workflow/known-pitfalls.md(line 38) advises against convertingTag/TagCompilationParticipantas a routine leaf because downstream consumers can't be validated by local CI. This PR deviates from that guidance deliberately, on the strength of the evidence above: for every consumer of the shipped bundle binary, the conversion is provably a no-op.Residual risk (stated honestly)
Tagfrom source (rather than consuming the p2/OSGi binary) was not exercised; the source declarations are semantically identical, but not byte-proven.JvmAnnotationType-based detection is long-standing behavior, but a pathologically old Xtend can't be ruled out from here.@Tag-using Xtend class against a bundle built from this PR and assert initializers10000+appear in itsxtend-genoutput.Status
Held in draft pending the author's final call (optionally after the downstream smoke test above); the technical blocker itself is resolved.
🤖 Generated with Claude Code