Skip to content

Commit 5b08ffa

Browse files
Merge pull request #925 from integer32llc/snapshot-announcement
Announcement that the snapshot branches are moving
2 parents 9fe3dcf + f24908e commit 5b08ffa

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
layout: post
3+
title: "Crates.io Index Snapshot Branches Moving"
4+
author: The Crates.io Team
5+
release: false
6+
---
7+
8+
Every so often, the [crates.io index](https://github.com/rust-lang/crates.io-index)'s Git history
9+
is [squashed into one
10+
commit](https://internals.rust-lang.org/t/cargos-crate-index-upcoming-squash-into-one-commit/8440)
11+
to minimize the history Cargo needs to download. When the index is squashed, we save snapshots
12+
to preserve the history of crate publishes.
13+
14+
Currently, those snapshots are stored as branches in the main index Git repository. Those branches
15+
are using server resources though, as the server still has to consider their contents whenever
16+
Cargo asks for the master branch. We will be deleting the snapshot branches from this repository to
17+
ensure that all objects referenced in the master branch will only be compressed against other
18+
objects in the master branch, ensuring that the current clone behavior will be much more efficient
19+
on the server side.
20+
21+
Here's how this might affect you:
22+
23+
## If you use Cargo
24+
25+
You should not see any effects from this change. Cargo does not use the snapshot branches, and
26+
Cargo regularly handles index squashes. If you do see any issues, they are a bug, please [report
27+
them on the Cargo repo](https://github.com/rust-lang/cargo).
28+
29+
## If you use the snapshot branches
30+
31+
In one week, on 2022-02-21, we will be removing all snapshot branches from the crates.io-index
32+
repo. All snapshot branches, both historical and in the future, are and will be in the
33+
[rust-lang/crates.io-index-archive repo](https://github.com/rust-lang/crates.io-index-archive)
34+
instead. Please update any scripts or tools referencing the snapshot branches by that time.
35+
36+
## In the future
37+
38+
In the medium term, we're working to prioritize the completion of [in-progress
39+
work](https://github.com/rust-lang/cargo/issues/9069) to add a way to serve the index as static
40+
files on HTTP, which will further ease the server load. The index repository will *not* be going
41+
away so that older versions of Cargo will continue to work. See [RFC
42+
2789](https://github.com/rust-lang/rfcs/pull/2789) for more details.

0 commit comments

Comments
 (0)