Skip to content

Validate every type set reference in EMV2 type products 馃 - #3250

Merged
lwrage merged 2 commits into
masterfrom
2743_validate_type_product_references
Sep 18, 2026
Merged

lwrage merged 2 commits into
masterfrom
2743_validate_type_product_references

Conversation

@lwrage

@lwrage lwrage commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #2743

EMV2 type products only reported a type set when it was the first element, and the error highlighted the entire product. Check every element and attach each diagnostic to the indexed type reference, retaining the message that identifies the offending type set.

Issue2743Test uses external AADL fixtures to cover first, middle, and last positions, multiple type sets, and a qualified alias. It checks all seven expected errors, their messages, and the exact highlighted reference text. Separate valid cases cover error-type products, single types, standalone type sets, aliases, and unions of type sets. Before the fix, the invalid fixture produced only two errors instead of seven; the valid cases passed.

Validation:

  • Focused regression: 2 tests passed.
    mvn -o -T5 -s releng/osate.releng/settings.xml -Plocal \
      -pl :org.osate.xtext.aadl2.errormodel,:org.osate.aadl2.errormodel.tests,:org.osate.xtext.aadl2.errormodel.feature \
      -Dtycho.localArtifacts=default -Dpr.build=true -Dsign=false \
      -Dspotbugs=false -Dcodecoverage=false -Djavadoc=false \
      -Dtest=Issue2743Test -DfailIfNoTests=false clean install
  • Full EMV2 suite: the same command without -Dtest=Issue2743Test passed 295 tests.
  • Clean root reactor: all 143 projects succeeded; Surefire reports contain 1,670 tests across 15 bundles, with zero failures, errors, or skips.
    mvn -o -T5 -s releng/osate.releng/settings.xml -Plocal \
      -Dtycho.localArtifacts=ignore -Dpr.build=true -Dsign=false \
      -Dspotbugs=false -Dcodecoverage=false -Djavadoc=false \
      -DfailIfNoTests=false clean install
  • git diff --check passed; the worktree is clean.

The regression commit precedes the production fix. This PR targets master and has no dependencies on unmerged PRs. Risk is limited to validation: previously missed invalid references now receive errors; grammar and model representation are unchanged.

Exercise type sets in the first, middle, and last positions of EMV2 type products, including multiple references and a qualified alias. Require one error on each reference with its type set name.

Validate the supporting type library and legal products and standalone type sets separately. The invalid fixture reproduces the defect with only two diagnostics instead of seven.
Check each element of an EMV2 type product and report type set errors against the indexed TypeToken.type reference. This catches non-leading type sets and limits each diagnostic to the offending reference while preserving the existing named message and valid standalone type sets.

The issue #2743 regression now passes both tests, including all seven expected reference diagnostics.
@lwrage
lwrage merged commit c780889 into master Sep 18, 2026
1 check passed
@lwrage
lwrage deleted the 2743_validate_type_product_references branch September 18, 2026 16:31
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.

Incomplete validation on reference from type product to type set.

2 participants