Skip to content

DO NOT REVIEW: ci: check that generated sources match their MWE2 workflows - #1674

Draft
joaodinissf wants to merge 3 commits into
masterfrom
gen-sync-step-1
Draft

joaodinissf wants to merge 3 commits into
masterfrom
gen-sync-step-1

Conversation

@joaodinissf

@joaodinissf joaodinissf commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Runs MWE2 workflows without Eclipse and checks in CI that committed generated sources match them.

  • com.avaloq.tools.ddk.workflow gets a pom again and joins the default <modules> of ddk-parent, so it is compiled and covered by PMD, Checkstyle and SpotBugs. This reverses the pom removal in build: enable the Tycho baseline version #1371, which was made because the module was not built. The bundle is in no feature, so no version bump.
  • .github/scripts/regenerate.sh asks Tycho for each owning bundle's resolved dependencies (tycho-dependency-tools-plugin:list-dependencies), points DDK entries at the reactor's target/classes, adds the patched ANTLR generator, and runs Mwe2Launcher from the bundle's directory. It stops if a bundle is not built and exits non-zero if a workflow fails; --list prints the workflows it runs.
  • The new generated-sources job in verify.yml builds the owning bundles, runs the script, and fails with the diff if git status --porcelain reports anything. Maven runs before the workflows, since jgit.dirtyWorkingTree is an error in CI.
  • Eclipse is the reference: every tracked workflow has an MWE2 launch, and the script fails if one has none. This adds launches for GenerateExport, GenerateExpression, GenerateFormat, GenerateFormatterTestLanguage, GenerateScope, ModelInference and TypeModel, and points GenerateCheckCfg's launch at the workflow bundle. The CI error and AGENTS.md name the launch first and the script second.
  • Launch files are not packaged, so like .project they no longer change a bundle's qualifier; the launch fix in checkcfg.core would otherwise fail the version baseline check.
  • The script discovers the workflows with git ls-files '*.mwe2', so a new one is checked automatically. EXCLUDE lists the three that aren't standalone workflows. KNOWN_DRIFT lists the seven whose output still differs, each with the issue that removes it (Regenerate the DDK languages: committed generated files drift from their workflows #1671, check.test.runtime: GenerateTestLanguage output diverges from the committed sources and does not compile #1672); a listed workflow that no longer exists is an error. Today the check runs GenerateExpression, GenerateScope, TypeModel and ModelInference.
  • AGENTS.md describes how to regenerate locally.

Verified locally on Temurin 21: the install and the script pass with a clean tree afterwards; a committed hand edit to a generated file makes the check fail; an unbuilt bundle stops the script; PMD, CPD, Checkstyle and SpotBugs pass on the workflow module.

Fixes #1669

🤖 Generated with Claude Code

@joaodinissf
joaodinissf added this pull request to stack #1681 November 28, 2026 11:49
@joaodinissf joaodinissf changed the title ci: check that generated sources match their MWE2 workflows DO NOT REVIEW: ci: check that generated sources match their MWE2 workflows Nov 28, 2026
joaodinissf and others added 2 commits November 28, 2026 13:36
com.avaloq.tools.ddk.workflow holds most of the DDK's MWE2 workflows and
ExtendedLanguageConfig. It now has a pom again and is in the default
modules of ddk-parent, so it is compiled and covered by PMD, Checkstyle
and SpotBugs, and Tycho can resolve the classpath to run its workflows.
Its pom had been removed in #1371 because the module was not built. The
bundle is in no feature, so it needs no version bump.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
.github/scripts/regenerate.sh runs every tracked MWE2 workflow without
Eclipse, except those in EXCLUDE (not standalone workflows) and
KNOWN_DRIFT (output not yet in sync, each with the issue that fixes
it); a listed workflow that is no longer tracked is an error. For each
owning bundle it asks Tycho for the resolved dependencies
(tycho-dependency-tools-plugin:list-dependencies), points the DDK
entries at the reactor's target/classes, adds the patched ANTLR
generator, writes the classpath to a java argfile and runs
Mwe2Launcher from the bundle's directory. It exits non-zero if any
workflow fails. exec-maven-plugin cannot do this, since its %classpath
lacks Tycho's p2 dependencies.

The generated-sources job in verify.yml builds the owning bundles, runs
the script and fails with the diff if git status reports any change.
Maven runs before the workflows, as jgit.dirtyWorkingTree is an error
in CI. Today it checks GenerateExpression, GenerateScope, TypeModel and
ModelInference; #1671 and #1672 empty KNOWN_DRIFT.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every tracked workflow now has an MWE2 launch: new ones in
com.avaloq.tools.ddk.workflow for Export, Expression, Format,
FormatterTestLanguage, Scope, ModelInference and TypeModel, and
GenerateCheckCfg.mwe2.launch now runs the workflow from
com.avaloq.tools.ddk.workflow, where it lives, instead of a path that does
not exist in checkcfg.core.

Eclipse output is the reference for generated sources. regenerate.sh fails
when a workflow has no launch, AGENTS.md and the generated-sources error
name the Eclipse launch first, and the script must reproduce what the
launches generate.

Launch files are not packaged, so they no longer change the bundle
qualifier, like .project. Otherwise the launch fix in checkcfg.core alone
would fail the version baseline check with "Only qualifier changed".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regenerate the MWE2 workflows without Eclipse and check generated sources in CI

1 participant