Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start accepting any URI scheme in the index #2934

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

vinistock
Copy link
Member

@vinistock vinistock commented Nov 28, 2024

Motivation

Another step towards #1908

After the recent changes, we can now make the index treat entries coming from any URIs appropriately.

Implementation

The main aspect of change is changing the @files_to_entries variable into @uris_to_entries. Since entries can now be discovered in URIs not backed by a file on disk, we need to be able to add, remove and handle changes based on URIs.

Additionally, for synchronizing changes in the index, we need to accept the source now, which will be kept in memory for unsaved files.

Note: this is a breaking change because it means that the entries_for API now needs to accept a URI instead of a file path.

Automated Tests

Added a test that verifies all of the important functionality for entries discovered in unsaved URIs.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vinistock vinistock added breaking-change Non-backward compatible change server This pull request should be included in the server gem's release notes labels Nov 28, 2024 — with Graphite App
@vinistock vinistock marked this pull request as ready for review November 28, 2024 16:45
@vinistock vinistock requested a review from a team as a code owner November 28, 2024 16:45
lib/ruby_indexer/lib/ruby_indexer/index.rb Outdated Show resolved Hide resolved
lib/ruby_indexer/lib/ruby_indexer/index.rb Outdated Show resolved Hide resolved
@vinistock vinistock force-pushed the 11-28-start_accepting_any_uri_scheme_in_the_index branch from a2083e2 to 03f69b8 Compare November 28, 2024 20:47
@vinistock vinistock requested a review from andyw8 November 28, 2024 20:49
@vinistock vinistock merged commit cb47bb7 into main Nov 29, 2024
42 checks passed
@vinistock vinistock deleted the 11-28-start_accepting_any_uri_scheme_in_the_index branch November 29, 2024 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Non-backward compatible change 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