Skip to content

Added test dependency for official parser (issue 119)#125

Open
Deni1593 wants to merge 10 commits into
MontiCore:masterfrom
Deni1593:issue-119
Open

Added test dependency for official parser (issue 119)#125
Deni1593 wants to merge 10 commits into
MontiCore:masterfrom
Deni1593:issue-119

Conversation

@Deni1593
Copy link
Copy Markdown
Collaborator

@Deni1593 Deni1593 commented May 5, 2026

Changed files: root build.gradle and language/build.gradle

Added files: ParsersComparisonTest.java


// 2) Official OMG parser
String input = Files.readString(modelPath);
SysMLInteractiveResult result = official.eval(input);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not completely sure but this method probably also checks the official context conditions. So if line 70 only tests parsing then this should also only test parsing. Otherwise you are testing two different functionalities. Extract the method that is relevant and use it there.

But first look at the other comment.

Comment thread language/build.gradle Outdated
implementation "org.apache.commons:commons-lang3:$commons_lang_version"
implementation "commons-cli:commons-cli:$commons_cli_version"

def omg_version = "0.18.0"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

  1. Move this definition in the gradle properties file and use the same version in both subprojects.

  2. Please use an up to date official parser version... The java version may match but there were changes to the sysml specification since then. probably 0.58. My fault

Comment thread language/build.gradle Outdated
implementation "commons-cli:commons-cli:$commons_cli_version"

def omg_version = "0.18.0"
testImplementation(group: "org.omg.sysml", name: "org.omg.sysml.interactive", version: omg_version, classifier: "all")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a little problematic. In the pipeline we have a flag "isPipelineFullBuild" that only loads the visualization subproject only if the flag is set. This way the user can check out the projects without having a github login. This breaks that principle. This needs to be a conditional dependency and the test itself needs to be excluded from the test source sets both depending on the flag.

Comment thread build.gradle Outdated
"StateActions.sysml",
"ConditionalSuccessionExample-1.sysml"
})
public void testParsingModels(String modelName) throws IOException {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would also temporarely add @disabled to the test to fix the pipeline until we decide how to fix the negative parsing errors.

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.

2 participants