aelve/codesearch

Show related code in older versions of the package

Closed this issue · 2 comments

Show how many versions of this library there are with the ability to view code in them.

Also see https://www.reddit.com/r/rust/comments/azznac/announce_online_grep_through_all_sources_on/eibrlx5:

[...] all I can think of is it'd be nice if someone solved the versioning issue. I imagine codesearch is most amazing in a monorepo and it generally does well in a many-repos environment but there are times when you intentionally have an old dependency or you are patching a previous release and your search results are irrelevant because they are all for HEAD and some of your dependencies have gone through a major refactoring.

No idea if the Rust community needs it (we seem to assume using the latest dependencies), what the indexing time, index size, or complexity of this would be but one idea to solve this is if you could index all versions but exclude all but latest version. From a user's perspective, they could

  • Explicitly opt-in to an old version

  • Pass a Cargo.lock to configure your repos (search all of my dependencies, pinned to these versions)

  • Specify a crate and version, and search the latest version of all crates that have that in their Cargo.lock or maybe have a compatible Cargo.toml dependency?