mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-12 07:14:38 +00:00
02486dc064
https://rustsec.org/advisories/RUSTSEC-2024-0384 says to migrate off of the `instant` crate because it's unmaintained. We depend on it only via the `backoff` crate. That crate also seems unmaintained. So this patch replaces our use of `backoff` by a custom implementation. I initially intended to migrate to the `backon` crate, but that made `lock::tests::lock_concurrent` tests fail. The test case spawns 72 threads (on my machine) and lets them all lock a file, and then it waits 1 millisecond before releasing the file lock. I think the problem is that their version of jitter is implemented as a random addition of up to the initial backoff value. In our case, that means we would add at most a millisecond. The `backoff` crate, on the other hand does it by adding -50% to +50% of the current backoff value. I think that leads to a much better distribution of backoffs, while `backon`'s implementation means that only a few threads can lock the file for each backoff exponent.
106 lines
2.7 KiB
TOML
106 lines
2.7 KiB
TOML
[package]
|
|
name = "jj-lib"
|
|
description = "Library for Jujutsu - an experimental version control system"
|
|
autotests = false
|
|
|
|
version = { workspace = true }
|
|
edition = { workspace = true }
|
|
rust-version = { workspace = true }
|
|
license = { workspace = true }
|
|
homepage = { workspace = true }
|
|
repository = { workspace = true }
|
|
documentation = { workspace = true }
|
|
readme = { workspace = true }
|
|
|
|
include = [
|
|
"/LICENSE",
|
|
"/benches/",
|
|
"/src/",
|
|
"/tests/",
|
|
"!*.pending-snap",
|
|
"!*.snap*",
|
|
]
|
|
|
|
|
|
[[test]]
|
|
name = "runner"
|
|
|
|
[[bench]]
|
|
name = "diff_bench"
|
|
harness = false
|
|
|
|
[build-dependencies]
|
|
version_check = { workspace = true }
|
|
|
|
[dependencies]
|
|
async-trait = { workspace = true }
|
|
blake2 = { workspace = true }
|
|
bstr = { workspace = true }
|
|
chrono = { workspace = true }
|
|
chrono-english = { workspace = true }
|
|
clru = { workspace = true }
|
|
config = { workspace = true }
|
|
digest = { workspace = true }
|
|
either = { workspace = true }
|
|
futures = { workspace = true }
|
|
git2 = { workspace = true, optional = true }
|
|
gix = { workspace = true, optional = true }
|
|
gix-filter = { workspace = true, optional = true }
|
|
glob = { workspace = true }
|
|
hashbrown = { workspace = true }
|
|
hex = { workspace = true }
|
|
ignore = { workspace = true }
|
|
indexmap = { workspace = true }
|
|
itertools = { workspace = true }
|
|
jj-lib-proc-macros = { workspace = true }
|
|
maplit = { workspace = true }
|
|
once_cell = { workspace = true }
|
|
pest = { workspace = true }
|
|
pest_derive = { workspace = true }
|
|
pollster = { workspace = true }
|
|
prost = { workspace = true }
|
|
rand = { workspace = true }
|
|
rand_chacha = { workspace = true }
|
|
rayon = { workspace = true }
|
|
ref-cast = { workspace = true }
|
|
regex = { workspace = true }
|
|
same-file = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
smallvec = { workspace = true }
|
|
strsim = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
tokio = { workspace = true, optional = true }
|
|
tracing = { workspace = true }
|
|
watchman_client = { workspace = true, optional = true }
|
|
whoami = { workspace = true }
|
|
zstd = { workspace = true }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
rustix = { workspace = true }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
winreg = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
assert_matches = { workspace = true }
|
|
criterion = { workspace = true }
|
|
esl01-renderdag = { workspace = true }
|
|
indoc = { workspace = true }
|
|
insta = { workspace = true }
|
|
num_cpus = { workspace = true }
|
|
pretty_assertions = { workspace = true }
|
|
test-case = { workspace = true }
|
|
testutils = { workspace = true }
|
|
tokio = { workspace = true, features = ["full"] }
|
|
|
|
[features]
|
|
default = ["git"]
|
|
git = ["dep:git2", "dep:gix", "dep:gix-filter"]
|
|
vendored-openssl = ["git2/vendored-openssl"]
|
|
watchman = ["dep:tokio", "dep:watchman_client"]
|
|
testing = ["git"]
|
|
|
|
[lints]
|
|
workspace = true
|