prebuild checks

Cerrado
#44 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@arlange ya está trabajando en esto.

Desde el 29/10/2026.

  • #49 de @arlange — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

Problem

Most user mistakes are only found by the Maven build, which takes minutes. The messages then come from Xtext, Xbase or javac and don't say what to change.

Today only a few things are checked up front:

  • Metamodels: that they load, pass EcoreValidator, and have a unique name and nsURI.
  • Reactions: ReactionsProcessor checks only that imports name uploaded nsURIs and that a reactions: segment exists.

Proposal

  1. Semantic reactions checks against the EPackages the service has already loaded. Each check reports the file, line and column:

    Check Example message
    Every alias used is declared by an import "cad is not imported; the declared aliases are model, model2"
    in reaction to changes in A / execute actions in B name declared aliases "execute actions in model3: model3 is not imported"
    alias::Class exists in that metamodel "model2 has no class Entitiy; did you mean Entity?" (closest names by edit distance)
    alias::Class[feature] exists "Component has no feature component; its features are name (attribute), links (reference, many) …", inherited features included
    The change type fits the feature "inserted in needs a multi-valued reference, but Link[protocol] is single-valued; use replaced at"
  2. Metamodel checks that EcoreValidator misses but that break Java code generation later. Each message names the element (e.g. Component.name) and says what to change in the model editor.

    • names that are Java keywords, or clash with generated methods (class, Package, eClass, getClass);
    • class names that differ only in letter case, which collide as generated files on some file systems;
    • package names that aren't valid Java identifiers;
    • attributes or references without a type.

    Also reword the existing EcoreValidator messages to use names like Component.name.

  3. Hint catalog for the Xtext/Xbase messages that still come from Maven, attached as hint to the problems from the structured-errors issue:

    Message Hint
    mismatched input … the expected syntax, with a minimal example
    Couldn't resolve reference to EClass … the did-you-mean from point 1
    The method X is undefined for the type Y the features Y really has
    type mismatch in a routine call the routine's signature
  4. Spike: in-process parsing with the real Reactions grammar.

    • Put tools.vitruv.dsls.reactions.language on the service's classpath to get exact syntax and linking errors without Maven.
    • Risks: Xtext/Guice next to Spring Boot 4. Errors inside reaction code blocks (Xbase) need the compiled model classes, so they would be filtered out here and left to Maven.
    • Outcome: if the spike works, it replaces the regex-based parsing in ReactionsProcessor; if not, document why.

Acceptance criteria

  • Typos in an alias, class name or feature name are reported within one second, before any Maven run, with a did-you-mean suggestion when a close match exists.
  • Each metamodel check has a fixture that previously failed only in the Maven build and now fails up front with a message naming the element.
  • The spike has a written result: works or doesn't, and why.

Depends on the structured-errors issue for the problems format.

Lenguaje dominante
Java
Estrellas
0
Forks
0
Merge medio
8 h 5 min
PR fusionados (30 d)
15

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de vitruv-tools/Methodologist-SetupService

Todos los issues de vitruv-tools/Methodologist-SetupService

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.