Skip to content

Commit 312452d

Browse files
committed
fix(vcs): update jj-lib 0.44 API usage and vendored config defaults
jj-lib 0.44 moved default_working_copy_factories() from the workspace module to default_backend_factories, and dropped StoreFactories::default() (the pre-configured factories with git/simple backends registered) in favor of a free function default_backend_factories() in the same module. StoreFactories::empty() is a different, unconfigured thing. jj-cli 0.44 also introduced a new `builtin_log()` revset alias and changed `revsets.log` to reference it instead of inlining the expression. Updated the vendored jj-defaults.toml to match, which the vendored_defaults_match_jj tripwire test caught. Fixes CI build/test failures on all three platforms after the dependabot bump to jj-lib/jj-cli 0.44.0.
1 parent 5e5dbb8 commit 312452d

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

‎.claude/settings.local.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"enabledMcpjsonServers": [
33
"annot-dev"
4+
],
5+
"disabledMcpjsonServers": [
6+
"annot-dev"
47
]
58
}

‎src-tauri/src/vcs/jj/jj-defaults.toml‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# jj's own defaults — copied verbatim from jj-cli 0.43
1+
# jj's own defaults — copied verbatim from jj-cli 0.44
22
# (`cli/src/config/misc.toml` and `cli/src/config/revsets.toml`).
33
#
44
# These live in jj-cli, not jj-lib, and annot links only jj-lib (jj-cli writes to
@@ -33,7 +33,7 @@ simplify-parents = "reachable(@, mutable())"
3333
# log revset is also used as the default short-prefixes. If it failed to
3434
# evaluate, lengthy warning messages would be printed. Use present(expr) if
3535
# symbols in expr might not always exist.
36-
log = "present(@) | ancestors(immutable_heads().., 2) | trunk()"
36+
log = "builtin_log()"
3737
# Emit the working-copy branch first, which is usually most interesting.
3838
# This also helps stabilize output order.
3939
log-graph-prioritize = "present(@)"
@@ -56,6 +56,10 @@ latest(
5656
)
5757
'''
5858

59+
# The default set of revisions shown by `jj log` if no revisions or paths are
60+
# specified.
61+
'builtin_log()' = 'present(@) | ancestors(immutable_heads().., 2) | trunk()'
62+
5963
# If immutable_heads() failed to evaluate, many jj commands wouldn't work. Use
6064
# present(expr) if symbols in expr might not always exist.
6165
'builtin_immutable_heads()' = 'trunk() | tags() | untracked_remote_bookmarks()'

‎src-tauri/src/vcs/jj/mod.rs‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,23 @@ use jj_lib::conflicts::{
4141
MaterializedTreeValue,
4242
};
4343
use jj_lib::copies::{CopyOperation, CopyRecords};
44+
use jj_lib::default_backend_factories::{
45+
default_backend_factories, default_working_copy_factories,
46+
};
4447
use jj_lib::fileset;
4548
use jj_lib::id_prefix::IdPrefixContext;
4649
use jj_lib::matchers::{EverythingMatcher, Matcher, NothingMatcher};
4750
use jj_lib::merged_tree::MergedTree;
4851
use jj_lib::object_id::ObjectId as _;
49-
use jj_lib::repo::{ReadonlyRepo, Repo as _, StoreFactories};
52+
use jj_lib::repo::{ReadonlyRepo, Repo as _};
5053
use jj_lib::repo_path::{RepoPath, RepoPathUiConverter};
5154
use jj_lib::revset::{
5255
self, RevsetAliasesMap, RevsetDiagnostics, RevsetExtensions, RevsetParseContext,
5356
RevsetStreamExt as _, RevsetWorkspaceContext, SymbolResolver, UserRevsetExpression,
5457
};
5558
use jj_lib::settings::{HumanByteSize, UserSettings};
5659
use jj_lib::working_copy::{SnapshotOptions, WorkingCopyFreshness};
57-
use jj_lib::workspace::{default_working_copy_factories, Workspace};
60+
use jj_lib::workspace::Workspace;
5861
use pollster::FutureExt as _;
5962

6063
use super::{tree_sort, BlobRef, DiffTarget, FileEntry, FileStatus, Prepared};
@@ -102,7 +105,7 @@ impl JjRepo {
102105
let workspace = Workspace::load(
103106
&settings,
104107
root,
105-
&StoreFactories::default(),
108+
&default_backend_factories(),
106109
&default_working_copy_factories(),
107110
)
108111
.map_err(|e| jj_err("failed to load jj workspace", e))?;

0 commit comments

Comments
 (0)