[WIP] Move in-memory providers to diskann-inmem crate - blocked by orphan rules#713
Draft
[WIP] Move in-memory providers to diskann-inmem crate - blocked by orphan rules#713
Conversation
Co-authored-by: harsha-simhadri <5590673+harsha-simhadri@users.noreply.github.com>
… rule issues Co-authored-by: harsha-simhadri <5590673+harsha-simhadri@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Move in-mem provider to its own crate
[WIP] Move in-memory providers to diskann-inmem crate - blocked by orphan rules
Feb 3, 2026
Contributor
|
@copilot List all instances of orphan rule violations and lets work on resolving case by case |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Attempts to extract in-memory providers from
diskann-providersinto a standalonediskann-inmemcrate. The refactoring is blocked by Rust's orphan rules - the inmem providers implementdiskann-providerstraits fordiskann-providerstypes, which is only permitted within the same crate.Changes Made
diskann-inmemcrate: New workspace member with provider implementations moved fromdiskann-providers/src/model/graph/provider/async_/inmem/diskann_providers::instead ofcrate::diskann_asyncmodule and storage implementations to new cratediskann-benchmarkanddiskann-disknow depend on and import fromdiskann-inmemSQError: Moved todiskann-providers/src/storage/sq_storage.rsto avoid circular dependenciesOrphan Rule Violations
Multiple trait implementations violate Rust's orphan rules:
The code compiled when in
diskann-providersbecause trait, implementation, and types were co-located.Resolution Options
diskann-inmem-defined newtypesdiskann-providers, move data structures only (creates circular deps)diskann-providersdiskann-inmem(larger refactor)Current state: crate structure exists but doesn't compile. Requires architectural decision before proceeding.
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.