[BLOCKED/DRAFT] refactor: migrate Xtend to Java - com.avaloq.tools.ddk.xtext.test.core (Tag)#1423
Draft
joaodinissf wants to merge 1 commit into
Draft
Conversation
…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>
rubenporras
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.
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.
This bookmarks completed migration work but is blocked on an unresolved question. Kept as a draft so the work isn't lost while we sort it out.
What this contains
Converts
Tag(the last.xtendin the module) from Xtend to Java, keeping@Active(TagCompilationParticipant)+@Retention(RUNTIME)+ the processor + theorg.eclipse.xtext.xtend.libMANIFEST dependency, and removes the module's Xtend build infrastructure (.classpath/.project/build.properties/xtend-gen). Local gate (compile + checkstyle + pmd + spotbugs,-DskipTests) is green.Why it's blocked
Tagis an Xtend active annotation:TagCompilationParticipantruns at Xtend-compile time and assigns each@Tag-annotated field a unique integer (fromCOUNTER_BASE = 10000). Critically:@Tagfields itself — the real consumers are downstream (closed-source ASMD monorepo).Tagbecomes a Java@interface. The failure mode (uninitialized tag = 0) is runtime, and our local gate runs with-DskipTests.annotationcompiles to a Java@interface+@Active, so this is plausibly bytecode-equivalent (and refactor: migrate all Xtend files to Java 21 #1274 did the same) — but that rests on the Xtend compiler recognizing a Java-authored@interface+@Activeas an active annotation, which only a downstream build can confirm.What we need to do to unblock (pick one)
@interface+@Activeas an active annotation and validate downstream (ASMD) that@Tag int FOOstill auto-numbers → then flip.@Tagfield (incl. downstream), then dropTag/TagCompilationParticipantentirely — a coordinated cross-repo refactor.Tagto the dedicated active-annotation/macro-retirement effort and keep it as Xtend until then.🤖 Generated with Claude Code