Go client: Convert cannot set `documents` / `compact` / `omit_derived` / `keep_derived` / `include_check_diagnostics` (service and every other client expose them)
维护者通常 1 天内回复
评估
- 难度
- 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 内容生成。
描述
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 amodel_hash, write only these documents;
the rest are read for references. Empty writes every document. Reported as
convert_documents.bool compact = 9— writeapi-json-compact/1. Reported asconvert_compact.bool omit_derived = 10— withcompact, drop derived metamodel properties
except those inkeep_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—convertOptionshas only
from,tolerated,idForm,libraryStubs,inherited.client/opensysml/authoring.go:199—convertRequestsets only
FromFormat,ToFormat,TolerateSyntaxErrors,IdForm,
IncludeLibraryStubs,InheritedMembers.- No
WithDocuments,WithCompact,WithOmitDerived,WithKeepDerived,
WithCheckDiagnosticsexists 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-131marks Go "bound" for
convert_documents/convert_compact; the options table at:146omits the
Go column entirely, andclient/opensysml/parity_options_test.gohas no test
for any of these request fields.TestClientCapabilityChecklistonly 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,
Convert14.9 s,
Generate1.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 分钟
- 30 天内合并 PR
- 897
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Open-MBEE/OpenSysML 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 55/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 28/100
维护者通常 1 天内回复
查看 Open-MBEE/OpenSysML 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 66/100
AvengeMedia/DankMaterialShell#4301 · 1 条评论 ·
-
priority: p2 type: bug type: docs
难度 2/5 1-3 小时 新手友好度 84/100
googleapis/google-cloud-swift#1641 ·
维护者通常 1 天内回复
-
needs-triage
难度 2/5 1-3 小时 新手友好度 72/100
krakenhavoc/cmd_and_ctrl#5853 ·
维护者通常 1 天内回复
-
flaky test: TestTRTAsyncPrefillFailures/transport reads the token load before prefillDone has released it可能已有人在做 @Jackmeson1 今天认领。 未关闭area/cicd area/gateway kind/misc
难度 2/5 1-3 小时 新手友好度 85/100
vllm-project/aibrix#3488 · 2 条评论 ·
维护者通常 1 天内回复