15 Commits

Author SHA1 Message Date
Emily
e5478bbf7b cargo: use gix/zlib-rs feature
This uses `zlib-rs`, a native Rust library that is comparable in
performance to `zlib-ng`. Since there’s no complicated C build
and gitoxide only has one hashing backend now, this lets us drop our
`packaging` feature without adding any awkward build requirements.

`zlib-rs` is generally faster at decompression than
`zlib-ng`, and faster at compression on levels 6 and 9; see
<https://trifectatech.org/blog/zlib-rs-is-faster-than-c/>
for details.

I couldn’t get reliable‐looking benchmark results out of my
temperamental laptop; `hyperfine` seemed to think that some random
`jj` workloads I tested might be slightly slower than with `zlib-ng`,
but it wasn’t unambiguously distinguishable from noise, so I’d
like to see measurements from others.

It’s certainly a lot faster than the previous default, and I
think it’s likely that `zlib-rs` will continue to get faster
and that it’s more than worth avoiding the headaches of a native
library with a CMake build dependency. (Though on the other hand,
if distributions move in the direction of shipping `zlib-ng` by
default, maybe there will be more motivation to make `libz-ng-sys`
support system libraries.)
2025-04-08 22:12:25 +00:00
Yuya Nishihara
30134e523b cargo: bump gix and its dependencies recursively
This should fix git::import_refs() issue with gix 0.71.0. Old commits could be
repopulated by importing stale refs stored in packed-refs.

https://github.com/GitoxideLabs/gitoxide/issues/1928

The Zlib license is added to the allow list because foldhash appears in the
dependency chain.
2025-04-06 10:59:40 +00:00
Yuya Nishihara
f2f2e26bb3 cargo-deny: remove chrono-english advisory from ignore list
It's addressed by e3924482 "time_util: replace use of `chrono-english` by
`interim`."
2025-03-25 12:36:28 +00:00
Evan Mesterhazy
29e2ccf4ae cargo-deny: Ignore paste crate deprecation
The paste crate hasn't had a maintainer since Oct. 2024. We don't use it
directly, but it's used by ratatui, and there's no direct replacement for it
AFAIK.

Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0436

This is currently blocking PRs because ci fails:
```
error[unmaintained]: paste - no longer maintained
    ┌─ /github/workspace/Cargo.lock:262:1
    │
262 │ paste 1.0.15 registry+https://github.com/rust-lang/crates.io-index
    │ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ unmaintained advisory detected
    │
    ├ ID: RUSTSEC-2024-0436
    ├ Advisory: https://rustsec.org/advisories/RUSTSEC-2024-0436
    ├ The creator of the crate `paste` has stated in the [`README.md`](https://github.com/dtolnay/paste/blob/master/README.md) 
      that this project is not longer maintained as well as archived the repository
    ├ Announcement: https://github.com/dtolnay/paste
    ├ Solution: No safe upgrade is available!
    ├ paste v1.0.15
      └── ratatui v0.29.0
          └── scm-record v0.5.0
              └── jj-cli v0.27.0
                  └── (dev) jj-cli v0.27.0 (*)

advisories FAILED
```
2025-03-07 19:21:36 +00:00
Yuya Nishihara
f81f9f91eb cargo: add sapling-streampager dependency
The WTFPL license is added to the allow list. I've never heard about this
license, but it's basically the same as public domain according to wikipedia.
2025-01-14 01:13:13 +00:00
Martin von Zweigbergk
6f38131193 cargo-deny: temporarily allow chrono-english crate
https://rustsec.org/advisories/RUSTSEC-2024-0395 recommends migrating
off od `chrono-english`, but that doesn't seem easy. I've spent a few
hours on it already.
2024-11-11 07:04:21 -08:00
Ilya Grigoriev
1dc0c7698d cargo-deny: add MPL-2.0 to allowed licenses
For some reason, the current version of `cargo-deny-action` does not
require it, but the one in the next commit fails if the license is
not added.
2024-08-05 22:46:31 -07:00
Ilya Grigoriev
6e7a20edd7 cargo-deny: use the new default for deny.toml
This is needed because old keys are becoming unsupported in the next
version of the `cargo-deny` action.

This was obtained as follows:
- Run `cargo deny init`
- Modify (only) the `licenses.allow` field to match what we had before.
2024-08-05 22:46:31 -07:00
Ilya Grigoriev
71d832b878 Add Unicode-3.0 to allowed licenses
Without this, `cargo deny` fails after a `cargo update`
(https://github.com/martinvonz/jj/actions/runs/9531433728/job/26272377250?pr=3892
failed, but once it includes this commit, #3892 no longer has a `cargo
deny` failure. The windows failure is unrelated))
2024-06-15 16:48:43 -07:00
Martin von Zweigbergk
e46cbfc9d0 cargo: replace dependency on Sapling's dag by renderdag
The rendering is now its own crate, so we don't need to depend on the
other `dag` code.

Fixes #1056.
2023-01-22 00:03:48 -08:00
Michael Forster
6324d0a644 Disable RUSTSEC-2021-012 advisory for cargo deny 2023-01-16 22:15:55 +01:00
Martin von Zweigbergk
3e0f6ef2b9 cli: use is_tty() from crossterm crate instead of atty
The `atty` crate seems unmaintained. There's
https://rustsec.org/advisories/RUSTSEC-2021-0145 filed against it,
which `cargo-deny` complains about. A fix for that has been open for
well over a year without being fixed
(https://github.com/softprops/atty/pull/51). It turns out the
functionality is also available via the `crossterm` crate (thanks,
@yuja), which we already depend on.

Since we also depend on `atty` via `clap`, I also added an exception
to the `cargo-deny` config.
2022-11-23 20:12:45 -10:00
Josh Soref
a591325e07 spelling: into
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-09-09 11:58:37 -07:00
Martin von Zweigbergk
47e7307dcc cargo: run cargo update
Our current version of `cpufeatures` was yanked so we needed to
upgrade at least that. Note that I had to add "UNICODE-DFS-2016" as an
allowed license for `cargo-deny`. I also had to upgrade `chrono` from
0.4.20 to 0.4.22 in the `Cargo.toml` files to prevent `cargo update`
from *downgrading* it in the lock file.
2022-09-06 15:50:05 -07:00
Augie Fackler
6f21b321b0 deny: new config file for cargo-deny
This lets us quickly check for vulnerabilities and licenses we don't want.
2022-08-22 22:33:37 -04:00