Skip to content

create a scip-latest branch for users interested in testing latest-upstream-Sorbet version - #264

Merged
emidoots merged 305 commits into
scip-latestfrom
emi/update-3-additional-fixes
Sep 21, 2026
Merged

emidoots merged 305 commits into
scip-latestfrom
emi/update-3-additional-fixes

Conversation

@emidoots

@emidoots emidoots commented Sep 21, 2026

Copy link
Copy Markdown
Member

I created a scip-latest branch. That branch is currently set to the latest upstream Sorbet version as of about a week ago, specifically 7459ce5.

This PR merges all changes from #261 #262 #263 into that branch.

Motivation

The goal of this branch scip-latest is to allow users interested in testing all of these changes to do so, before those three PRs land and become the default branch of https://github.com/sourcegraph/scip-ruby

Test plan

See descriptions of #261 #262 #263

Note this PR only creates a non-default scip-latest branch.

Mainly to check that no ENFORCEs are triggered.
Keeping this a separate commit with the hope that it will
help git better understand the move separately.
Index explicit return operands even when a lambda shares a static initializer CFG, while continuing to skip the synthetic final return. Preserve return and next operand locations and use their inferred types rather than the bottom type of the return instruction.

Restore the lost name references in two historical Dependabot Terraform adapters. Cover file-level lambdas, guarded and parenthesized returns, nested blocks, next, and lambda returns; refresh two snapshots for precise field/local ranges and accurate return-value hovers. All 90 SCIP fixtures pass with both parsers.

Signed-off-by: Emi <emi@sourcegraph.com>
Index symbol-to-proc method targets and keep keyword colons out of local ranges. Add snapshots for aliases, destructuring, keyword shorthand, and local scopes. The safe-navigation and union-receiver fixes from this source commit are already in the regression branch.

Adapted-from: 4b3fdf4b9225a6d6a2a313332bfe48f77d55ecc0
Signed-off-by: Emi <emi@sourcegraph.com>
Enable RBS rewriting and diagnostic assertions in the SCIP harness, using Prism for RBS fixtures. Add valid and invalid annotation examples and document fixture settings. Both-parser checks remain in the regression branch.

Adapted-from: 46735c4aabac2744cfe8e061c9627818a7a389d5
Signed-off-by: Emi <emi@sourcegraph.com>
Collect type aliases, type members, and method type parameters from the resolved AST using their semantic identities. Preserve navigation through signatures and RBS annotations even when CFG optimization removes aliases. Add multi-file and generic-type snapshots.

Adapted-from: d1f290ab550f52ec8c89b3d57d5d443fcaf59816
Signed-off-by: Emi <emi@sourcegraph.com>
Retain source mappings for RBS type names, namespaces, aliases, and continuation lines. Suppress occurrences for generated T helpers and preserve the handwritten class receiver when expanding generic construction. Keep ordinary Sorbet locations unchanged.

Adapted-from: 2333517cdb71f868f39ab3d3ebd9fa771fca572a
Signed-off-by: Emi <emi@sourcegraph.com>
Render declaration hovers with class self types so generic members remain visible. Preserve keyword and block parameter names through RBS signature resolution and source generation. Cover Ruby and RBS method signatures.

Adapted-from: 557f2f837e4e582c11a8ef02abbf1e6dcf7541df
Signed-off-by: Emi <emi@sourcegraph.com>
Retain resolved keyword targets during dispatch and emit stable parameter symbols at declarations and call sites. Preserve local shorthand reads and Ruby/RBS parameter ranges, including cross-file calls and invalid-call coverage.

Adapted-from: 7f6adc6b953132e7d8dd8a83af3ed275d712c238
Signed-off-by: Emi <emi@sourcegraph.com>
Retain the RBS intersection fixtures after moving receiver dispatch and Ruby coverage into the regression branch.

Adapted-from: e3d45a5ef1b43a399eb35695e6352dd1bff45f76
Signed-off-by: Emi <emi@sourcegraph.com>
Add SCIP snapshots for assignment targets, block locals, callable returns, enum constants, and implicit it parameters inherited from upstream Sorbet.

Adapted-from: d4aba7073a8aa8a7cacae222774265186d7b02fe
Signed-off-by: Emi <emi@sourcegraph.com>
Preserve field-symbol identities when indexing constant aliases used as ancestor qualifiers, avoiding an invalid class-symbol conversion. Cover alias-based inheritance with SCIP snapshots.

Adapted-from: 67769de3d5235f27e516de5608d14fe5ab607591
Signed-off-by: Emi <emi@sourcegraph.com>
Match an intrinsic stub without an arity only until its first real definition. Give later incompatible definitions distinct method symbols so AST parameter lists and symbols remain consistent. Add a namer regression for redefined intrinsics.

Adapted-from: 360d648d13d2a1fc11ce6f8b205ce97d5f50c511
Signed-off-by: Emi <emi@sourcegraph.com>
Remember resolved class targets before alias redeclarations clear their cached types. Keep naming phases consistent in SCIP mode and cover reopened aliases, nested scopes, and method ownership.

Adapted-from: 8ac870f319feb928af2ca907e1bbc41457e1eeb9
Signed-off-by: Emi <emi@sourcegraph.com>
Exercise parenthesized paths, unresolved aliases, and continued indexing after missing constants. The resolver implementation is already present in the replay base; this commit adds the SCIP coverage.

Adapted-from: c9267302154bc4069ecdd809031940aad436d127
Signed-off-by: Emi <emi@sourcegraph.com>
Cover invalid attached-class declarations, inherited type members, Module subclasses, and valid factories. These tests exercise the resolver recovery already present in the replay base.

Adapted-from: 217ad2f0b00fb2da587d63d1386903774d5d62ca
Signed-off-by: Emi <emi@sourcegraph.com>
Use the existing T::Class result for module receivers retained by invalid-ancestor recovery during SCIP indexing. Keep the requires-ancestor assertion outside SCIP mode and cover direct and inherited receiver cases.

Adapted-from: a2855251ebf33ee759c7b5565868a30fe0e3b7c1
Signed-off-by: Emi <emi@sourcegraph.com>
Preserve tuples and hash shapes when widening literal branches in SCIP unions. Keep tuple-to-array widening consistent and retain the existing subtype assertions. Add type-level and index snapshots with ordinary Sorbet controls.

Adapted-from: e4a46437ef80920349f482b9ceca242e5aed6d77
Signed-off-by: Emi <emi@sourcegraph.com>
Keep hash shapes precise when rebuilding unions during distributed intersections, preserving the subtype invariant. Add type-level and indexing regressions while retaining ordinary Sorbet behavior.

Adapted-from: a948ce029423df4351ed5e95e0b32fd5b826b7e5
Signed-off-by: Emi <emi@sourcegraph.com>
Retain computed intersection branches after impossible nested union components are eliminated. Build exact unions without widening aggregates and preserve existing subtype assertions. Add type-level and SCIP fixtures.

Adapted-from: 434de54ef26a688ee21803e84dd19f7490a8a4c2
Signed-off-by: Emi <emi@sourcegraph.com>
Guard the final definition writer against missing or empty source locations and count skipped definitions. Inject a location-less definition in the test harness and verify that valid definitions and references still index with both parsers.

Adapted-from: a3855bbf2c6185b3a0d5ebcfab72942846ad9a50
Signed-off-by: Emi <emi@sourcegraph.com>
Recombine distributed intersections without widening hash shapes, eliminate bottom and identical branches, and look up retained shape and tuple methods on Hash and Array. Keep ordinary Sorbet behavior unchanged and cover type-level invariants and SCIP output.

Adapted-from: 09e84993356a615d03f26d22854383ee200df00e
Signed-off-by: Emi <emi@sourcegraph.com>
Declare the framework DSL calls retained by the regression fixes in the Minitest and RSpec fixtures. Refresh the additional snapshots for scoped local symbols, specific constructor targets, and the integrated keyword/type/intersection coverage. Keep the improved type-alias hover in the legacy single-argument union fixture. All 122 snapshot fixtures pass with their configured parsers and diagnostic assertions.

Signed-off-by: Emi <emi@sourcegraph.com>
Exercise global keyword-parameter symbols through guarded and parenthesized returns, nested blocks, lambda returns, and next. Include a positional-parameter control and hover snapshots. The shared operand-location and type handling is provided by the regression branch.

Signed-off-by: Emi <emi@sourcegraph.com>
Honor skipped symbol generation for inherited fields and aliases instead of asserting or emitting an empty relationship. Preserve the affected file and all relationships with valid targets. Cover top-level RSpec setup fields, nested examples, and ordinary parent/mixin relationships; reject empty targets in snapshot validation. The former implementation fails the new fixture; all 128 SCIP fixtures pass with both parsers.

Signed-off-by: Emi <emi@sourcegraph.com>
Delegate comparator blocks to normal Array dispatch so inference receives block parameter types and the deferred result type. Keep the tuple shortcut for calls without a block. Cover min/max, counted results, empty tuples, comparator references, and precise no-block results. The former indexer asserts on the fixture; both parsers now pass.

Signed-off-by: Emi <emi@sourcegraph.com>
Calls such as instance.sig can report an unknown method without providing a class to extend. Skip the class edit when that class or its singleton is unavailable, preserving the original diagnostic and continued indexing. Cover missing instance DSL methods and ordinary class-level T::Sig use with both parsers.

Signed-off-by: Emi <emi@sourcegraph.com>
Keep an explicit intersection when merging a covariant ancestor would change an invariant or fixed subclass argument. This prevents constructing an invalid subtype while preserving method navigation from both constraints. Restrict recovery to SCIP mode and retain existing same-class refinement. Cover both operand orders, union narrowing, ordinary covariance, and method/hover output; bump the SCIP cache identity for the changed resolved types.

Signed-off-by: Emi <emi@sourcegraph.com>
Append scip-ruby to a nonempty configured cache directory before cache
cleanup or creation. This separates SCIP from Sorbet when both inherit
--cache-dir from sorbet/config, while keeping caching disabled by default.
Document the effective directory in the SCIP CLI reference.
@emidoots emidoots changed the title Emi/update 3 additional fixes create a scip-latest branch for users interested in testing latest-upstream-Sorbet version Sep 21, 2026
@emidoots
emidoots merged commit 8a257aa into scip-latest Sep 21, 2026
4 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.

9 participants