Skip to content

Commit

Permalink
build: switch back to gix/max-performance-safe feature by default
Browse files Browse the repository at this point in the history
Using `gix/max-performance` requires `cmake` as a build-time dependency, which could be a significant barrier for contributors (including existing ones, like me, who already work on jj but didn't have `cmake` installed thus far).

This commit switches back to using `gix/max-performance-safe`, which doesn't have the `cmake` dependency, and adds `gix/max-performance` behind the `gix-max-performance` feature for `jj-lib`.

It also adds `gix-max-performance` to the `packaging` feature group, since I'm assuming that packagers will want maximum performance, and are more likely to have `cmake` at hand.

Tested with

```
$ cargo build --workspace
$ cargo build --workspace --features packaging
```

(and the `--features packaging` build failed until I installed `cmake`)
  • Loading branch information
arxanas committed Dec 7, 2024
1 parent da3c75b commit 27c6e19
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ gix = { version = "0.68.0", default-features = false, features = [
"attributes",
"blob-diff",
"index",
"max-performance",
"max-performance-safe",
] }
glob = "0.3.1"
hashbrown = { version = "0.15.2", default-features = false, features = ["inline-more"] }
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jj-cli = { path = ".", features = ["test-fakes"], default-features = false }
[features]
default = ["watchman"]
bench = ["dep:criterion"]
packaging = []
packaging = ["jj-lib/gix-max-performance"]
test-fakes = ["jj-lib/testing"]
vendored-openssl = ["git2/vendored-openssl", "jj-lib/vendored-openssl"]
watchman = ["jj-lib/watchman"]
Expand Down
6 changes: 6 additions & 0 deletions lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ tokio = { workspace = true, features = ["full"] }
[features]
default = ["git"]
git = ["dep:git2", "dep:gix"]
gix-max-performance = [
# Requires `cmake` as a build dependency.
# Note that this feature is different from `gix/max-performance-safe`.
# See: https://docs.rs/gix/latest/gix/#performance
"gix/max-performance",
]
vendored-openssl = ["git2/vendored-openssl"]
watchman = ["dep:tokio", "dep:watchman_client"]
testing = ["git"]
Expand Down

0 comments on commit 27c6e19

Please sign in to comment.