Skip to content
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

ReqM2 importer cannot match linksto ids without type integrated into the id (which is valid ReqM2) #350

Open
insi-eb opened this issue Nov 30, 2022 · 1 comment
Labels

Comments

@insi-eb
Copy link

insi-eb commented Nov 30, 2022

Description

if the ReqM2 importer sees something like the following:

<specobjects doctype="src">
    <specobject>
      <id>/path/to/some/file.cpp</id>
      <status>approved</status>
      <sourcefile>/path/to/some/file.cpp</sourcefile>
      <sourceline>13</sourceline>
      <version>1</version>
      <providescoverage>
        <provcov>
          <linksto>swdd.some_specobject_id</linksto>
          <dstversion>1</dstversion>
        </provcov>
      </providescoverage>
    </specobject>
</specobjects>

it emits a warning

WARNING: Name 'swdd.some_specobject_id' does not match legacy name pattern '(\p{Alpha}+)(?:~\p{Alpha}+)?:(\p{Alpha}[\w-](?:.\p{Alpha}[\w-])*+)': using artifact type 'unknown'.

and tries to match linkage to an unknown~swdd.some_specobject_id specobject, which of course doesn't exist and therefore fails the tracing graph.

The ReqM2 is valid based on the specification - you do not have to include the type in linksto items.

Steps to Reproduce

see above

Expected behavior

linksto ID is matched based just on the id, not id/type combination. this could be controlled by command-line flag (sth. like "id_based_matching") to avoid problems with non-ReqM2-using tracing projects which might use the same id in different types with the current matching.

Environment

  • OFT: 3.6.0
  • OS: OpenSUSE Leap 15.4
  • Java Version: openjdk version "11.0.17"]
  • Maven Version (in case of build problems only): n/a

Additional context

n/a

@redcatbear
Copy link
Collaborator

Hi @insi-eb, OFT IDs always need an artifact type an ID without artifact type is incomplete. For formats that do not have the concept of an artifact you need to inject the artifact type from the side.

An example of how this can be done can be seen in https://github.com/itsallcode/openfasttrace-gradle#configuring-the-short-tag-importer where you can define path patterns for the TAG importer that automatically set the artifact type in case it is missing.

This is not yet a feature of the OFT core though. First we need #353 (central config) and then this feature could be extracted from the Gradle plugin. We don't have a lot of time on our hands at the moment, so your help would be appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📫 Backlog
Development

No branches or pull requests

2 participants