API JSON: a source range on each element
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- go
- Domain
- api, backend-api-design
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Go
- Stars
- 24
- Forks
- 5
- Avg merge
- 10h 11m
- Merged PRs (30d)
- 572
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Open-MBEE/OpenSysML
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Open-MBEE/OpenSysML#720 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Open-MBEE/OpenSysML#608 · 2 comments ·
Maintainers usually reply within 1 day
All issues in Open-MBEE/OpenSysML
Similar issues
-
automation models
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
txn2/mcp-data-platform#1984 ·
Maintainers usually reply within 1 day
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
kind/docs prio/P2
Difficulty 1/5 Under an hour Newbie friendliness 95/100
agent-substrate/substrate#1986 ·
Maintainers usually reply within 1 day