Skip to content

Validate projects without building them #52

Closed

Description

@a77med-Ibrahim

Problem

The checks only run as part of /api/vsum/build and /api/vsum/jar. The platform needs to check the working copy after every auto-save: 5 seconds after the last change, at the latest every 60 seconds (vitruv-tools/Vitruv-UI-Methodologist#635). The problems are shown as warnings while users edit. That has to happen without generating a project, without running Maven, and without waiting behind a running build.

Proposal

POST /api/vsum/validate

  • Takes the same multipart input as /api/vsum/build.
  • Runs the same checks the build runs before Maven, through the same code.
  • Doesn't write a project to disk and doesn't run Maven.
  • Returns 200 with { valid, problems }, also for invalid projects. valid is false if there are any problems. Returns 400 only for malformed requests.
  • Doesn't use the build slots (max-concurrent-builds), so it never waits behind a running build.

Acceptance criteria

  • An invalid project returns 200 with valid: false and the same problems the build would report before Maven.
  • A validation request is answered while a build is running.
  • No files are left behind in the build workspace.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions