Skip to content

767 fix error reporting #773

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 17, 2025
Merged

Conversation

atextor
Copy link
Contributor

@atextor atextor commented Jun 16, 2025

Description

  • Overhaul of the error reporting: Models are not merged into one RDF graph any more, but instead a view to their union (via an RDF dataset) is created. This keeps the parser token information in TokenRegistry up to date (as long as a model was not migrated in the meantime).
  • The above point also adresses the detection and reporting of duplicate model element definitions.
  • The RustLikeViolationFormatter is removed, it was never intended to have a separate formatter for that, but instead the functionality was incorporated into the regular ViolationFormatter (thus breaking change).
  • ViolationFormatter now uses a consistent formatting for Syntax Errors vs. Semantic Errors
  • Parsing and reporting of wrong literal values was improved (e.g., samm:exampleValue "123"^^xsd:int when Characteristic uses xsd:string datatype).
  • samm-cli was changed in a way to also apply the ViolationFormatter for loading errors (e.g., when a samm:Property is missing its samm:characteristic), thus highlighting the source location where this occurs.
  • In the AspectModelLoader, the new wrapper method "withValidation()" is added that allows to perform all loading functionality with integrated validation and that returns an Either of violations or the loaded Aspect model

Fixes #767. Fixes #772.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Copy link
Contributor

@Yauhenikapl Yauhenikapl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@atextor atextor merged commit 6a47363 into eclipse-esmf:main Jun 17, 2025
4 checks passed
@atextor atextor deleted the 767-fix-error-reporting branch June 17, 2025 10:54
Copy link

Release v2.11.0 addresses this.

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.

[BUG] Detect and report duplicate model element definitions [BUG] Fix error reporting
2 participants