Skip to content

Index SCIP field enclosing_range#838

Merged
jupblb merged 3 commits intosourcegraph:mainfrom
CatherineGasnier:fix-enclosing-range-method-833
Feb 13, 2026
Merged

Index SCIP field enclosing_range#838
jupblb merged 3 commits intosourcegraph:mainfrom
CatherineGasnier:fix-enclosing-range-method-833

Conversation

@CatherineGasnier
Copy link
Contributor

@CatherineGasnier CatherineGasnier commented Dec 1, 2025

Fixes #833

@CatherineGasnier CatherineGasnier changed the title Fix computeEnclosingRange for method definitions Index SCIP field enclosing_range Dec 1, 2025
@CatherineGasnier
Copy link
Contributor Author

Issues that I don't know how to fix for now:

  • had to update semanticdb.proto. Would probably need a PR there too?
  • not sure how to unit test
  • had to manually copy the enclosing_range field and its doc from sourcegraph/scip/scip.proto repo

@CatherineGasnier CatherineGasnier force-pushed the fix-enclosing-range-method-833 branch 2 times, most recently from f1e75e6 to 9f95a07 Compare February 11, 2026 15:45
@CatherineGasnier
Copy link
Contributor Author

Updated snapshots by first updating ScipPrinters.scala, then

./sbt
snapshots/run

Copy link
Member

@jupblb jupblb left a comment

Choose a reason for hiding this comment

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

Great work, thank you!

@jupblb jupblb enabled auto-merge (squash) February 13, 2026 00:17
@jupblb jupblb disabled auto-merge February 13, 2026 00:17
@jupblb jupblb force-pushed the fix-enclosing-range-method-833 branch 5 times, most recently from 153a1e9 to 503d626 Compare February 13, 2026 01:42
Catherine Gasnier and others added 3 commits February 13, 2026 01:42
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
- Add 2-space prefix to all source lines in snapshot output, matching
  the convention used by scip-go snapshots for caret-based indicators
- Convert tab indentation to 2-space indentation in test input files:
  TabIndented.java, AnnotationParameters.java, LombokBuilder.java
…tyle

Replace inline 'enclosing_range 3 2 5 3' format with visual marker lines:
- '⌄ enclosing_range_start <symbol>' before the source line
- '⌃ enclosing_range_end <symbol>' after the source line

Also fix SemanticdbVisitor to only compute enclosing ranges for
definition occurrences, not references (matching the original intent
of commit 9f95a07).
@jupblb jupblb force-pushed the fix-enclosing-range-method-833 branch from 503d626 to 2b90796 Compare February 13, 2026 01:43
@jupblb jupblb enabled auto-merge (squash) February 13, 2026 17:12
@jupblb jupblb merged commit abf6fcd into sourcegraph:main Feb 13, 2026
36 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Index enclosing_range

2 participants