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

ReqIF 'TOOL-EXTENSIONS' are not loaded. #16

Closed
5 tasks done
vincenpt opened this issue Mar 9, 2021 · 4 comments
Closed
5 tasks done

ReqIF 'TOOL-EXTENSIONS' are not loaded. #16

vincenpt opened this issue Mar 9, 2021 · 4 comments
Assignees
Labels

Comments

@vincenpt
Copy link

vincenpt commented Mar 9, 2021

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of the ReqIFSharp
  • I have searched open and closed issues to ensure it has not already been reported

Description

ReqIF 'TOOL-EXTENSIONS' are not loaded when the rest of the ReqIF file is deserialized.

Some brute force debugging of commenting out chunks of ReqIF.cs showed that commenting out the following lines in the ReqIF.cs file allows Tool-Extensions to load:

/// <summary>
/// Gets the mandatory Exchange Document content.
/// </summary>
[XmlArray("CORE-CONTENT")]
[XmlArrayItem("REQ-IF-CONTENT", typeof(ReqIFContent))]
public List<ReqIFContent> CoreContent
{
get
{
return this.coreContent;
}
}

Some further debugging into ReqIFContent.cs lead me to the ReadXml function:

public void ReadXml(XmlReader reader)
{
while (reader.Read())

The while loop appears to be iterating over all remaining XML elements in the file, going outside the scope of the CORE-CONTENT and REQ-IF-CONTENT elements.

Steps to Reproduce

Reference ReqIF file:
ProR_Traceability-Template-v1.0.reqif.zip

Following Nunit test fails for the provided ReqIF file:

var path = "ProR_Traceability-Template-v1.0.reqif";
var deserializer = new ReqIFSharp.ReqIFDeserializer();
var reqif = deserializer.Deserialize(path);

Assert.That(reqif.TheHeader, Is.Not.Empty);
Assert.That(reqif.CoreContent, Is.Not.Empty);

// Note: This is the problem. This SHOULDN'T be empty, but it is.
Assert.That(reqif.ToolExtensions, Is.Not.Empty);

System Configuration

  • ReqIFSharp version:
    • ReqIFSharp: v2.0.0
    • Other:
  • Environment (Operating system, version and so on): Windows 10
  • .NET Framework version: .NET Core 2.1
  • Additional information:
@samatrhea
Copy link
Member

@vincenpt, thanks for reporting the issue, we'll get on it to resolve the issue.

@samatrhea
Copy link
Member

@vincenpt I've identified the issue and i am working on a solution.

@samatrhea
Copy link
Member

@vincenpt: I managed to fix the issue and in the mean-time made other improvements; let me know whether release 3.0.0 solves this problem for you as well.

@samatrhea samatrhea self-assigned this Mar 21, 2021
@samatrhea samatrhea added the bug label Mar 21, 2021
@samatrhea
Copy link
Member

@vincenpt working on a web based reqif viewer, check it out here: https://viewer.reqifsharp.org/ and let us know what you think!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants