Skip to content

Check metamodels and reactions before the Maven build - #49

Merged
arlange merged 4 commits into
mainfrom
44-prebuild-checks
Nov 3, 2026
Merged

arlange merged 4 commits into
mainfrom
44-prebuild-checks

Conversation

@arlange

@arlange arlange commented Nov 2, 2026

Copy link
Copy Markdown
Member

Most mistakes are now rejected in milliseconds, before Maven runs, with the location in the upload and a suggestion:

  • Reactions: metamodel aliases, alias::Class (incl. subpackages and qualified names), trigger features (attribute or reference, multiplicity, element type), and abstract classes in create blocks. The rules follow the grammar, scope providers, and validator of the Reactions language 4.0.0; anything uncertain is left to the compiler.
  • Metamodels: names that differ only in case (classes, inherited features, enum literals), Java reserved words as class names, and classes named like the generated package/factory interfaces, each confirmed to break the generated code. EMF validation messages name the element instead of dumping objects and carry a hint.
  • Compiler messages of the Reactions build get hints from a catalog.

The README describes the checks and their dependency on the Reactions language rules.

Refs #44

Most mistakes are now rejected in milliseconds, before Maven runs, with
the location in the upload and a suggestion:

- Reactions: metamodel aliases, alias::Class (incl. subpackages and
  qualified names), trigger features (attribute or reference,
  multiplicity, element type), and abstract classes in create blocks.
  The rules follow the grammar, scope providers, and validator of the
  Reactions language 4.0.0; anything uncertain is left to the compiler.
- Metamodels: names that differ only in case (classes, inherited
  features, enum literals), Java reserved words as class names, and
  classes named like the generated package/factory interfaces, each
  confirmed to break the generated code. EMF validation messages name
  the element instead of dumping objects and carry a hint.
- Compiler messages of the Reactions build get hints from a catalog.

The README describes the checks and their dependency on the Reactions
language rules.

Refs #44

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@arlange arlange linked an issue Nov 2, 2026 that may be closed by this pull request
@arlange
arlange requested a review from a team November 2, 2026 18:17
- Use possessive quantifiers in the checker's patterns: backtracking
  could not find other matches anyway, and possessive matching cannot
  overflow the stack on long input.
- Match triggers in parts instead of one large pattern, and split the
  trigger and metaclass checks into smaller methods.
- Use \w, constants for repeated literals, no nested ternaries.
- Tests: assert that valid inputs are accepted, and keep only the
  failing call inside assertThrows.

The checker's results are unchanged: the same findings and mutation
detection over 337 reactions files of real projects.

Refs #44

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@arlange
arlange merged commit 3b4278e into main Nov 3, 2026
5 checks passed
@arlange
arlange deleted the 44-prebuild-checks branch November 3, 2026 07:38
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.

prebuild checks

2 participants