2023-08-04 22:59:19 +00:00
|
|
|
[package]
|
|
|
|
name = "jj-cli"
|
2023-08-05 22:14:11 +00:00
|
|
|
description = "Jujutsu - an experimental version control system"
|
2023-08-04 22:59:19 +00:00
|
|
|
default-run = "jj"
|
2024-02-02 07:55:24 +00:00
|
|
|
autotests = false
|
2023-08-04 22:59:19 +00:00
|
|
|
|
2023-08-22 16:41:42 +00:00
|
|
|
version = { workspace = true }
|
|
|
|
edition = { workspace = true }
|
|
|
|
rust-version = { workspace = true }
|
|
|
|
license = { workspace = true }
|
|
|
|
homepage = { workspace = true }
|
|
|
|
repository = { workspace = true }
|
|
|
|
documentation = { workspace = true }
|
|
|
|
keywords = { workspace = true }
|
2023-08-05 22:14:11 +00:00
|
|
|
|
2024-04-14 22:27:23 +00:00
|
|
|
include = [
|
|
|
|
"/LICENSE",
|
|
|
|
"/build.rs",
|
|
|
|
"/examples/",
|
|
|
|
"/src/",
|
2024-11-05 05:52:04 +00:00
|
|
|
"/docs/**",
|
2024-04-14 22:27:23 +00:00
|
|
|
"/testing/",
|
|
|
|
"/tests/",
|
|
|
|
"!*.pending-snap",
|
|
|
|
"!*.snap*",
|
cli: make git support optional
There are some experiments to try and compile `jj` to WebAssembly, so that we
might be able to do things like interactive web tutorials. One step for that
is making `git` support in `jj-cli` optional, because we can stub it out for
something more appropriate and it's otherwise a lot of porting annoyance for
both gitoxide and libgit2.
(On top of that, it might be a useful build configuration for other experiments
of mine where removing the need for the large libgit2 depchain is useful.)
As part of this, we need to mark `jj-lib` as having `default-features = false`
in the workspace dependency configuration; otherwise, the default behavior
for Cargo is to compile with all its default features, i.e. with git support
enabled, ignoring the `jj-cli` features clauses.
Other than that, it is fairly straightforward junk; it largely just sprinkles
some `#[cfg]` around liberally in order to make things work. It also adjusts the
CI pipeline so this is tested there, too, so we can progressively clean it up.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-01-03 04:52:52 +00:00
|
|
|
"/tests/cli-reference@.md.snap",
|
2024-04-14 22:27:23 +00:00
|
|
|
]
|
|
|
|
|
2023-08-04 22:59:19 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "jj"
|
|
|
|
path = "src/main.rs"
|
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "fake-editor"
|
|
|
|
path = "testing/fake-editor.rs"
|
2023-09-20 05:30:34 +00:00
|
|
|
required-features = ["test-fakes"]
|
2023-08-04 22:59:19 +00:00
|
|
|
|
|
|
|
[[bin]]
|
|
|
|
name = "fake-diff-editor"
|
|
|
|
path = "testing/fake-diff-editor.rs"
|
2023-09-20 05:30:34 +00:00
|
|
|
required-features = ["test-fakes"]
|
2023-08-04 22:59:19 +00:00
|
|
|
|
2024-05-15 17:39:33 +00:00
|
|
|
[[bin]]
|
|
|
|
name = "fake-formatter"
|
|
|
|
path = "testing/fake-formatter.rs"
|
|
|
|
required-features = ["test-fakes"]
|
|
|
|
|
2024-02-02 07:55:24 +00:00
|
|
|
[[test]]
|
|
|
|
name = "runner"
|
|
|
|
|
2023-08-04 22:59:19 +00:00
|
|
|
[dependencies]
|
2024-07-15 08:45:52 +00:00
|
|
|
bstr = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
chrono = { workspace = true }
|
|
|
|
clap = { workspace = true }
|
2024-01-26 02:35:28 +00:00
|
|
|
clap-markdown = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
clap_complete = { workspace = true }
|
2024-02-16 20:23:41 +00:00
|
|
|
clap_complete_nushell = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
clap_mangen = { workspace = true }
|
2023-08-05 16:14:11 +00:00
|
|
|
criterion = { workspace = true, optional = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
crossterm = { workspace = true }
|
|
|
|
dirs = { workspace = true }
|
2024-06-30 10:02:21 +00:00
|
|
|
dunce = { workspace = true }
|
2023-10-18 23:57:19 +00:00
|
|
|
futures = { workspace = true }
|
cli: make git support optional
There are some experiments to try and compile `jj` to WebAssembly, so that we
might be able to do things like interactive web tutorials. One step for that
is making `git` support in `jj-cli` optional, because we can stub it out for
something more appropriate and it's otherwise a lot of porting annoyance for
both gitoxide and libgit2.
(On top of that, it might be a useful build configuration for other experiments
of mine where removing the need for the large libgit2 depchain is useful.)
As part of this, we need to mark `jj-lib` as having `default-features = false`
in the workspace dependency configuration; otherwise, the default behavior
for Cargo is to compile with all its default features, i.e. with git support
enabled, ignoring the `jj-cli` features clauses.
Other than that, it is fairly straightforward junk; it largely just sprinkles
some `#[cfg]` around liberally in order to make things work. It also adjusts the
CI pipeline so this is tested there, too, so we can progressively clean it up.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-01-03 04:52:52 +00:00
|
|
|
git2 = { workspace = true, optional = true }
|
|
|
|
gix = { workspace = true, optional = true }
|
2024-11-17 08:47:31 +00:00
|
|
|
glob = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
indexmap = { workspace = true }
|
2024-08-02 08:05:30 +00:00
|
|
|
indoc = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
itertools = { workspace = true }
|
|
|
|
jj-lib = { workspace = true }
|
|
|
|
maplit = { workspace = true }
|
2024-02-11 02:55:02 +00:00
|
|
|
minus = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
once_cell = { workspace = true }
|
|
|
|
pest = { workspace = true }
|
|
|
|
pest_derive = { workspace = true }
|
2023-10-28 23:15:01 +00:00
|
|
|
pollster = { workspace = true }
|
2024-05-15 22:19:55 +00:00
|
|
|
rayon = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
regex = { workspace = true }
|
|
|
|
rpassword = { workspace = true }
|
2024-11-14 09:25:26 +00:00
|
|
|
sapling-renderdag = { workspace = true }
|
2024-08-02 08:19:35 +00:00
|
|
|
sapling-streampager = { workspace = true }
|
2023-08-29 21:13:35 +00:00
|
|
|
scm-record = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
serde = { workspace = true }
|
2024-11-16 17:42:26 +00:00
|
|
|
serde_json = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
slab = { workspace = true }
|
2024-02-26 05:49:46 +00:00
|
|
|
strsim = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
tempfile = { workspace = true }
|
|
|
|
textwrap = { workspace = true }
|
|
|
|
thiserror = { workspace = true }
|
|
|
|
timeago = { workspace = true }
|
|
|
|
toml_edit = { workspace = true }
|
|
|
|
tracing = { workspace = true }
|
|
|
|
tracing-chrome = { workspace = true }
|
|
|
|
tracing-subscriber = { workspace = true }
|
2023-08-31 07:42:42 +00:00
|
|
|
unicode-width = { workspace = true }
|
2025-01-03 03:24:09 +00:00
|
|
|
whoami = { workspace = true }
|
2023-08-04 22:59:19 +00:00
|
|
|
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
2023-08-22 16:41:42 +00:00
|
|
|
libc = { workspace = true }
|
2023-08-04 22:59:19 +00:00
|
|
|
|
|
|
|
[dev-dependencies]
|
2023-08-22 16:41:42 +00:00
|
|
|
anyhow = { workspace = true }
|
|
|
|
assert_cmd = { workspace = true }
|
|
|
|
assert_matches = { workspace = true }
|
2023-11-07 07:15:31 +00:00
|
|
|
async-trait = { workspace = true }
|
2023-08-22 16:41:42 +00:00
|
|
|
insta = { workspace = true }
|
|
|
|
test-case = { workspace = true }
|
|
|
|
testutils = { workspace = true }
|
2023-09-20 05:30:34 +00:00
|
|
|
# https://github.com/rust-lang/cargo/issues/2911#issuecomment-1483256987
|
|
|
|
jj-cli = { path = ".", features = ["test-fakes"], default-features = false }
|
2023-08-04 22:59:19 +00:00
|
|
|
|
|
|
|
[features]
|
cli: make git support optional
There are some experiments to try and compile `jj` to WebAssembly, so that we
might be able to do things like interactive web tutorials. One step for that
is making `git` support in `jj-cli` optional, because we can stub it out for
something more appropriate and it's otherwise a lot of porting annoyance for
both gitoxide and libgit2.
(On top of that, it might be a useful build configuration for other experiments
of mine where removing the need for the large libgit2 depchain is useful.)
As part of this, we need to mark `jj-lib` as having `default-features = false`
in the workspace dependency configuration; otherwise, the default behavior
for Cargo is to compile with all its default features, i.e. with git support
enabled, ignoring the `jj-cli` features clauses.
Other than that, it is fairly straightforward junk; it largely just sprinkles
some `#[cfg]` around liberally in order to make things work. It also adjusts the
CI pipeline so this is tested there, too, so we can progressively clean it up.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-01-03 04:52:52 +00:00
|
|
|
default = ["watchman", "git"]
|
2023-09-07 16:19:33 +00:00
|
|
|
bench = ["dep:criterion"]
|
cli: make git support optional
There are some experiments to try and compile `jj` to WebAssembly, so that we
might be able to do things like interactive web tutorials. One step for that
is making `git` support in `jj-cli` optional, because we can stub it out for
something more appropriate and it's otherwise a lot of porting annoyance for
both gitoxide and libgit2.
(On top of that, it might be a useful build configuration for other experiments
of mine where removing the need for the large libgit2 depchain is useful.)
As part of this, we need to mark `jj-lib` as having `default-features = false`
in the workspace dependency configuration; otherwise, the default behavior
for Cargo is to compile with all its default features, i.e. with git support
enabled, ignoring the `jj-cli` features clauses.
Other than that, it is fairly straightforward junk; it largely just sprinkles
some `#[cfg]` around liberally in order to make things work. It also adjusts the
CI pipeline so this is tested there, too, so we can progressively clean it up.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-01-03 04:52:52 +00:00
|
|
|
git = ["jj-lib/git", "dep:git2", "dep:gix"]
|
2024-12-07 20:22:47 +00:00
|
|
|
gix-max-performance = ["jj-lib/gix-max-performance"]
|
|
|
|
packaging = ["gix-max-performance"]
|
revset: add count_estimate() to Revset trait
The count() function in this trait is used by "jj branch" to determine
(and then report) how many commits a certain branch is ahead/behind
another branch. This is currently implemented by walking all commits
in the revset, counting how many were encountered. But this could be
improved: if the number is large, it is probably sufficient to report
"at least N" (instead of walking all the way), and this does not scale
well to jj backends that may not have all commits present locally (which
may prefer to return an estimate, rather than access the network).
Therefore, add a function that is explicitly documented to be O(1)
and that can return a range of values if the backend so chooses.
Also remove count(), as it is not immediately obvious that it is an
expensive call, and callers that are willing to pay the cost can obtain
the exact same functionality through iter().count() anyway. (In this
commit, all users of count() are migrated to iter().count() to preserve
all existing functionality; they will be migrated to count_estimate() in
a subsequent commit.)
"branch" needed to be updated due to this change. Although jj
is currently only available in English, I have attempted to keep
user-visible text from being assembled piece by piece, so that if we
later decide to translate jj into other languages, things will be easier
for translators.
2024-01-16 22:12:02 +00:00
|
|
|
test-fakes = ["jj-lib/testing"]
|
2023-08-04 22:59:19 +00:00
|
|
|
vendored-openssl = ["git2/vendored-openssl", "jj-lib/vendored-openssl"]
|
|
|
|
watchman = ["jj-lib/watchman"]
|
2023-09-20 05:54:42 +00:00
|
|
|
|
|
|
|
[package.metadata.binstall]
|
|
|
|
# The archive name is jj, not jj-cli. Also, `cargo binstall` gets
|
|
|
|
# confused by the `v` before versions in archive name.
|
2023-10-18 23:57:19 +00:00
|
|
|
pkg-url = "{ repo }/releases/download/v{ version }/jj-v{ version }-{ target }.{ archive-format }"
|
2024-10-02 20:11:37 +00:00
|
|
|
|
|
|
|
[lints]
|
|
|
|
workspace = true
|