Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

API JSON: a source range on each element

クローズ
#654 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

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

評価

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

調査の方向性

Start in rdf_out.go, where e.offsets records node.Span().Offset and line regions are retained only for elements starting their own line. Trace the api-json encoder's syntax-node handling, including elements sharing a line with their owner. Done means every element, including nested same-line elements, has a sourceRange containing its file and start/end position information.

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

説明

On develop (72081f8), the API JSON gives an element its lines as written (sysx:sourceText) but not where they are, and an element sharing a line with its owner gets no text at all. The service's symbols (SymbolInfo) carry no position either; only diagnostics have a Span.

package W {
    part a { attribute x; }
    part b { attribute x; }
}

sysml -convert api-json gives W::a and W::b a sysx:sourceText each (" part a { attribute x; }\n"), and W::a::x and W::b::x none. Nothing in the output says where either x is declared.

Request: a range per element, for example sysx:sourceRange with file, start and end (line and column, or byte offsets). The encoder already has each element's syntax node, and records its start offset (rdf_out.go, e.offsets[...] = node.Span().Offset); line regions are kept only for elements that start their own line.

A consumer needs this to go from an element to its declaration, or to edit a model in place by position.

主要言語
Go
スター
24
フォーク
5
平均マージ
10時間 12分
マージ済み PR(30日)
598

環境構築

はじめの一歩

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

Open-MBEE/OpenSysML のほかの issue

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

似ている issue

Go の issue をもっと見る

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

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