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

refactor: abstract std::fs away from on-disk index cache #13515

Merged
merged 5 commits into from
Mar 1, 2024

Conversation

weihanglo
Copy link
Member

What does this PR try to resolve?

Part of #6908

This abstracts std::fs so that we can integrate SQLite into on-disk cache in follow-ups.

How should we test and review this PR?

  • Make sure the documentation still render well.
  • Shouldn't have any behavior change. Only a bit of extra allocations added.

Additional information

@rustbot
Copy link
Collaborator

rustbot commented Mar 1, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-registries Area: registries S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 1, 2024
/// Manages the on-disk index caches.
pub struct CacheManager<'gctx> {
/// [`GlobalContext`] reference for convenience.
pub gctx: &'gctx GlobalContext,
Copy link
Contributor

Choose a reason for hiding this comment

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

Feels weird to me that callers access the context through this

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed!

Copy link
Contributor

Choose a reason for hiding this comment

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

Passing in individual unstable features seems a bit higher churn as we evolve but whichever way.

@epage
Copy link
Contributor

epage commented Mar 1, 2024

@bors r+

@bors
Copy link
Collaborator

bors commented Mar 1, 2024

📌 Commit 330c6dc has been approved by epage

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 1, 2024
@bors
Copy link
Collaborator

bors commented Mar 1, 2024

⌛ Testing commit 330c6dc with merge 0342c44...

@bors
Copy link
Collaborator

bors commented Mar 1, 2024

☀️ Test successful - checks-actions
Approved by: epage
Pushing 0342c44 to master...

@bors bors merged commit 0342c44 into rust-lang:master Mar 1, 2024
21 checks passed
@weihanglo weihanglo deleted the index-cache branch March 1, 2024 21:50
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 2, 2024
Update cargo

12 commits in 8964c8ccff6e420e2a38b8696d178d69fab84d9d..f772ec0224d3755ce52ac5128a80319fb2eb45d0
2024-02-27 19:22:46 +0000 to 2024-03-01 22:57:35 +0000
- feat(toml): Warn on unset Edition (rust-lang/cargo#13505)
- fix(msrv): Report all incompatible packages, not just a random one (rust-lang/cargo#13514)
- refactor: abstract `std::fs` away from on-disk index cache (rust-lang/cargo#13515)
- chore(deps): update compatible (rust-lang/cargo#13507)
- chore(deps): update rust crate rusqlite to 0.31.0 (rust-lang/cargo#13510)
- [docs]: Clarify vendored sources as read-only and way to modify (rust-lang/cargo#13512)
- chore(deps): update rust crate supports-hyperlinks to v3 (rust-lang/cargo#13511)
- refactor: Clarify more Config -&gt; Context (rust-lang/cargo#13506)
- test: Make `edition` explicit in packages (rust-lang/cargo#13504)
- Add all unit's children recursively for `doc.extern-map` option (rust-lang/cargo#13481)
- fix(rustc): Always pass --edition to rustc (rust-lang/cargo#13499)
- Silently ignore `cargo::rustc-check-cfg` to avoid MSRV annoyance when stabilizing `-Zcheck-cfg` (rust-lang/cargo#13438)

r? ghost
@rustbot rustbot added this to the 1.78.0 milestone Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-registries Area: registries S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants