Closed Bug 1557442 Opened 6 years ago Closed 9 months ago

Improve position:sticky nestingRange info for rust code by augmenting rust save-analysis data with AST ranges of compound statement braces

Categories

(Webtools :: Searchfox, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1859373

People

(Reporter: asuth, Unassigned)

References

()

Details

The initial position:sticky nestingRange generation for rust is very poor because we basically only have the locations of the token for a given definition. We don't actually know the extent of its body. So the hack I went with was at least inferring that a parent definition must be at least as large as all of its children, providing coverage through at least the first line of its last child definition.

I'll file a rust issue for tracking in a sec once I have a bug number for this.

Note that the fix for bug 1556234 effectively means we have a wrapper around rustc and so can access more compiler internals than what's emitted to the save-analysis files. That would enable us to fix this bug more easily.

Awesome!

Andrew, do we still have this problem?

Flags: needinfo?(bugmail)

Thanks for your attention; this was addressed by my changes in bug 1859373 where we use a tree-sitter parse tree for context information. (Noting that SCIP did evolve to contain information on containing symbols, although I don't believe it's available in all languages that emit SCIP; I believe I had a question about that in some PR and Nicolas indicated that we do still need tree-sitter's help for at least some languages.)

Status: NEW → RESOLVED
Closed: 9 months ago
Duplicate of bug: 1859373
Flags: needinfo?(bugmail)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.