Skip to content

Make ranges typed oneofs#387

Merged
jupblb merged 12 commits into
mainfrom
michal/range
Jun 5, 2026
Merged

Make ranges typed oneofs#387
jupblb merged 12 commits into
mainfrom
michal/range

Conversation

@jupblb

@jupblb jupblb commented Apr 4, 2026

Copy link
Copy Markdown
Member

I'm not sure the storage savings are worth the effort.

jupblb added 2 commits June 3, 2026 21:42
Introduce SingleLineRange and MultiLineRange message types, and add
typed_range and typed_enclosing_range oneof fields to Occurrence.
The old repeated int32 range and enclosing_range fields are marked
deprecated.

The typed fields are self-documenting and eliminate the need to
disambiguate 3-element vs 4-element arrays at runtime.
@jupblb jupblb marked this pull request as ready for review June 3, 2026 21:11

@CatherineGasnier CatherineGasnier left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

me like

- Add Range.Validate; reject malformed enclosing ranges in convert
- Guard readTypedRange against nil oneof message pointers
- Surface missing/malformed occurrence ranges in scip lint
- Sort FindOccurrences by range only (no symbol tiebreaker)
@jupblb jupblb merged commit 3b30443 into main Jun 5, 2026
15 of 16 checks passed
@jupblb jupblb deleted the michal/range branch June 5, 2026 07:59
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.

3 participants