Go client: Convert cannot set `documents` / `compact` / `omit_derived` / `keep_derived` / `include_check_diagnostics` (service and every other client expose them)

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

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

@devin-ai-integration がすでに取り組んでいます。

2026年11月16日 から。

  • #2331 @devin-ai-integration による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
go

調査の方向性

Start with client/opensysml/authoring.go to trace how convertOptions become ConvertRequest fields, then review the request definitions in api/proto/sysml.proto and the existing option patterns. Add coverage in client/opensysml/parity_options_test.go and update docs/reference/client-parity.md; done means the Go client can set the listed conversion options and tests verify the corresponding request fields.

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

説明

enhancement performance

Disclaimer, the following issue report has been written by an AI

Summary

ConvertRequest supports document-scoped and compact API-JSON conversion, and every
non-Go client exposes it. client/opensysml exposes none of it: Convert always
writes every document in the model, in full derived-property form. The capability
table in docs/reference/client-parity.md nevertheless marks Go as "bound" for
convert_documents and convert_compact, because the names are declared in
types.go even though no option ever sets the request fields.

Service/CLI version: main @ cb359eb (also present in 0.12.1).

What the service already provides

api/proto/sysml.proto (ConvertRequest):

  • repeated string documents = 8 — for a model_hash, write only these documents;
    the rest are read for references. Empty writes every document. Reported as
    convert_documents.
  • bool compact = 9 — write api-json-compact/1. Reported as convert_compact.
  • bool omit_derived = 10 — with compact, drop derived metamodel properties
    except those in keep_derived.
  • repeated string keep_derived = 11.
  • bool include_check_diagnostics = 12 — add the semantic check's diagnostics to
    ConvertResponse.diagnostics, each with its severity. Reported as
    convert_check_diagnostics.

What the Go client does today

  • client/opensysml/authoring.go:65 — convertOptions has only
    from, tolerated, idForm, libraryStubs, inherited.
  • client/opensysml/authoring.go:199 — convertRequest sets only
    FromFormat, ToFormat, TolerateSyntaxErrors, IdForm,
    IncludeLibraryStubs, InheritedMembers.
  • No WithDocuments, WithCompact, WithOmitDerived, WithKeepDerived,
    WithCheckDiagnostics exists anywhere in the package.
  • client/opensysml/client.go:22 (Client) and :358 (caller) are
    unexported; there is no raw/generic call, so a caller cannot set the fields
    either.
  • docs/reference/client-parity.md:130-131 marks Go "bound" for
    convert_documents / convert_compact; the options table at :146 omits the
    Go column entirely, and client/opensysml/parity_options_test.go has no test
    for any of these request fields. TestClientCapabilityChecklist only checks
    that the capability name is declared, so the declaration alone passes while
    the option is missing.

Impact

Any in-process Go program pays a full-model API-JSON conversion even when it needs
one document. Measured on a real project (PLAIN, Reactor across its library and
the generated IFC vocabulary):

  • 572 KB of sources -> 79.7 MB / 51,386 elements, Convert 14.9 s,
    Generate 1.0 s;
  • converting only the project document would be ~8.2k elements and ~5.4 s, and the
    walker needs only the annotated usages.

There is no workaround: the service supports documents, but the only public Go
door does not.

Proposed API

Follow the existing option style (WithIDForm, WithLibraryStubs,
WithInheritedMembers):

// WithDocuments writes only the named documents of a parsed model; the model's
// other documents are read for the references into them. Requires
// CapabilityConvertDocuments.
func WithDocuments(names ...string) ConvertOption

// WithCompact writes the compact api-json-compact/1 document.
// Requires CapabilityConvertCompact.
func WithCompact() ConvertOption

// WithOmitDerived drops derived metamodel properties from a compact document,
// except the ones named in keep. Requires CapabilityConvertCompact.
func WithOmitDerived(keep ...string) ConvertOption

// WithCheckDiagnostics adds the semantic check's diagnostics (with severity) to
// Conversion.Diagnostics. Requires CapabilityConvertCheckDiagnostics.
func WithCheckDiagnostics() ConvertOption
主要言語
Go
スター
59
フォーク
20
平均マージ
10時間 23分
マージ済み PR(30日)
897

環境構築

はじめの一歩

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

Open-MBEE/OpenSysML のほかの issue

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

似ている issue

Go の issue をもっと見る

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

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