Skip to content

Commit

Permalink
cargo: stop cargo install from installing fake-editor & co.
Browse files Browse the repository at this point in the history
Among other things, this prevented `jj` from working with
`cargo binstall`.

The trick is taken from
rust-lang/cargo#2911 (comment).

We could now also remove `--bin jj` from the installation commands
in `install-and-setup.md`, but I'm not sure we should. That argument
makes it clear that the binary is `jj`, not `jj-cli`.

Fixes martinvonz#216.
  • Loading branch information
ilyagr committed Sep 20, 2023
1 parent 6d5390d commit b75baae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ path = "src/main.rs"
[[bin]]
name = "fake-editor"
path = "testing/fake-editor.rs"
required-features = ["test_utils"]

[[bin]]
name = "fake-diff-editor"
path = "testing/fake-diff-editor.rs"
required-features = ["test_utils"]

[build-dependencies]
cargo_metadata = { workspace = true }
Expand Down Expand Up @@ -72,10 +74,13 @@ assert_matches = { workspace = true }
insta = { workspace = true }
test-case = { workspace = true }
testutils = { workspace = true }
# https://github.com/rust-lang/cargo/issues/2911#issuecomment-1483256987
jj-cli = { path = ".", features = ["test_utils"], default-features = false }

[features]
default = ["watchman"]
bench = ["dep:criterion"]
packaging = []
test_utils = []
vendored-openssl = ["git2/vendored-openssl", "jj-lib/vendored-openssl"]
watchman = ["jj-lib/watchman"]

0 comments on commit b75baae

Please sign in to comment.