Skip to content

Start indexing and resolving Rubydex graph#3992

Open
vinistock wants to merge 1 commit intorubydex_adoption_feature_branchfrom
03-03-start_indexing_and_resolving_rubydex_graph
Open

Start indexing and resolving Rubydex graph#3992
vinistock wants to merge 1 commit intorubydex_adoption_feature_branchfrom
03-03-start_indexing_and_resolving_rubydex_graph

Conversation

@vinistock
Copy link
Member

Motivation

This PR starts indexing and resolving the Rubydex graph on boot and for tests. Note that consuming incremental changes is not yet a part of the API, so this PR doesn't address that yet.

Our strategy, for smaller and easier to review PRs, will be to maintain both indexing mechanisms while we migrate each request one by one. That way, we don't have to review a massive amount of changes and we can rely on CI.

Implementation

The implementation makes sure we're:

  • Instantiating the graph and configuring the encoding and workspace path
  • Indexing and resolving on boot and tests

@vinistock vinistock self-assigned this Mar 6, 2026
@vinistock vinistock requested a review from a team as a code owner March 6, 2026 15:08
@vinistock vinistock added server This pull request should be included in the server gem's release notes other Changes that aren't bugfixes, enhancements or breaking changes labels Mar 6, 2026
@vinistock vinistock requested review from alexcrocha and st0012 March 6, 2026 15:08
Base automatically changed from 02-10-adopt_rubydex to rubydex_adoption_feature_branch March 6, 2026 16:54
@vinistock vinistock force-pushed the 03-03-start_indexing_and_resolving_rubydex_graph branch from d3fa68d to c7cf7ea Compare March 6, 2026 16:55
@vinistock vinistock mentioned this pull request Mar 17, 2026
19 tasks
@vinistock vinistock force-pushed the rubydex_adoption_feature_branch branch from 4d27e4e to 5eae955 Compare March 18, 2026 14:21
@vinistock vinistock force-pushed the 03-03-start_indexing_and_resolving_rubydex_graph branch from c7cf7ea to de5e731 Compare March 18, 2026 14:22
@vinistock vinistock changed the base branch from rubydex_adoption_feature_branch to 03-18-upgrade_rubydex_to_v0.1.0.beta9 March 18, 2026 14:23
Base automatically changed from 03-18-upgrade_rubydex_to_v0.1.0.beta9 to rubydex_adoption_feature_branch March 18, 2026 17:14
@vinistock vinistock force-pushed the 03-03-start_indexing_and_resolving_rubydex_graph branch from de5e731 to e0a1f4a Compare March 18, 2026 17:16
Comment on lines +1231 to +1235
progress("indexing-progress", message: "Indexing workspace...")
@global_state.graph.index_workspace

progress("indexing-progress", message: "Resolving graph...")
@global_state.graph.resolve
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be inside its own Thread.new block as well, like the existing indexing? Or is Rubydex handling it in some other way

Copy link
Member Author

Choose a reason for hiding this comment

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

The old indexing happens inside a thread because it's too slow and we don't want to block requests while we're still indexing.

Rubydex is fast enough that we don't have to run indexing in a thread, which will simplify a lot of our code.

For example, right now, we need code to bust the code lens cache and trigger a refresh after indexing because we may have computed incorrect lenses if a request comes in before indexing is finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

other Changes that aren't bugfixes, enhancements or breaking changes server This pull request should be included in the server gem's release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants