GetElementProperties answers nothing for a model when one document has an error or a duplicate top-level name

オープン
#2,029 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
go

調査の方向性

Start by tracing the GetElementProperties entry point and how it builds the element form for a model containing multiple documents. Reproduce the reported behavior with the Pilot examples, including one document with an error or a duplicate top-level name. The issue is resolved when elements from unaffected documents remain readable while the problematic document is handled with an error or excluded from the element form.

索引モデルが issue の本文から書いたものです。

説明

bug

When the Pilot's examples are parsed as one model (195 files), GetElementProperties answers no element of the model if any one document:

  • has an error diagnostic, for example Dynamics.sysml ("cannot bind a value of dimension L^4·M^2·T^-5 to a feature typed by AccelerationValue"), or
  • declares a top-level name that another document also declares. The Pilot's training material has four such pairs, e.g. training/17. Control/Camera.sysml and examples/Camera Example/Camera.sysml.

The answer for every element is then the same message, for example:

cannot convert the declaration of Camera at …/training/17. Control/Camera.sysml:1:1: its id lands on the same IRI as Camera at …/examples/Camera Example/Camera.sysml:1:1, which another document declares, and merging two elements into one subject would be a different model

The reason given for the duplicate case makes sense. What makes it hard to use is the scope: one document affects the whole model. For a workspace of many files (an editor, a CI check over a repository), being able to read the elements of the other documents would help a lot. That could mean keeping the affected document out of the element form, or answering its elements with the error while the rest stay readable.

For reference, these documents are the ones OpenSysML reports errors in. The Pilot reports no error for any of them:

  • examples/Analysis Examples/Dynamics.sysml: the dimension check above
  • examples/Simple Tests/PartTest.sysml: "p1 participates in a specialization cycle"
  • both Annex A vehicle files: vehicle_b is hidden by two imports that bring distinct elements of that name
  • our C30-accept.sysml: a syntax error on entry … then …

Each of these may be worth a look on its own. We're happy to open separate issues if that's more convenient.

Found while building the census in #2028. In the census, such documents are left out for OpenSysML and listed under "Corpora".

主要言語
Go
スター
56
フォーク
17
平均マージ
12時間 45分
マージ済み PR(30日)
910

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Open-MBEE/OpenSysML のほかの issue

Open-MBEE/OpenSysML の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。