Skip to content

Conversation

matthewnitschke-wk
Copy link
Contributor

@matthewnitschke-wk matthewnitschke-wk commented Sep 27, 2025

FEDX-4020

Issue Status

SCIP has a concept of enclosing_range

This is self described as "the nearest non-trivial enclosing AST node" which can be used to:

- Call hierarchies: to determine what symbols are references from the body of a function
- Symbol outline: to display breadcrumbs from the cursor position to the root of the file
- Expand selection: to select the nearest enclosing AST node.
- Highlight range: to indicate the AST expression that is associated with a hover popover

The main one I'm currently interested in is the first, using it as a way to determine which symbols are referenced from the body of a function

There's a long term goal of scip to be leveraged as a tool to determine impact of cleaning up deprecated functions. Using this data, we should be able to correctly estimate the total number of lines that could be cleaned up, including those referenced transitively by fully deprecated functions. The bulk of this work is implemented in cp_lab's scip-toolkit, but might see movement of a more public location

loc.columnNumber - 1,
loc.columnNumber - 1 + nameLength
final start = getLocation(offset);
final end = getLocation(offset + nameLength);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enclosing_range is the first symbol that will commonly span multiple lines. as such our old getRange function wasn't built to handle this. That's what these updates are doing

@bender-wk bender-wk changed the title Populate enclosing_range FEDX-4020: Populate enclosing_range Sep 29, 2025
@alanknight-wk
Copy link

@Workiva/release-management-pp

Copy link

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 from RM

@btr-rmconsole-1 btr-rmconsole-1 bot merged commit f6c125d into master Sep 30, 2025
14 checks passed
@btr-rmconsole-1 btr-rmconsole-1 bot deleted the populate_enclosing_range branch September 30, 2025 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants