Skip to content

Conversation

@ilyagr
Copy link
Contributor

@ilyagr ilyagr commented Oct 25, 2025

See commit description.

Checklist

If applicable:

  • (n/a) I have updated CHANGELOG.md
  • (n/a) I have updated the documentation (README.md, docs/, demos/)
  • (n/a) I have updated the config schema (cli/src/config-schema.json)
  • (n/a) I have added/updated tests to cover my changes

@ilyagr ilyagr force-pushed the ig/testutils-without-git branch 2 times, most recently from b8d7026 to 7cfebc3 Compare October 25, 2025 07:29
@ilyagr ilyagr force-pushed the ig/testutils-without-git branch from 7cfebc3 to eff671e Compare October 25, 2025 23:21
Copy link
Contributor Author

@ilyagr ilyagr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking a look, Martin!

I think this PR is getting close, though it is not done super-carefully. I may have left some low-lying fruit on the tree.

This PR does make testutils compile without git. While I still don't understand the problem with gix I described in the PR description, this PR does solve it.

It's also hard to make this PR careful; I added a review comment about one particularly confusing issue in lib/Cargo.toml. That issue might be independent of this PR, though.

@ilyagr ilyagr force-pushed the ig/testutils-without-git branch from eff671e to 0c71b1a Compare October 27, 2025 20:33
@ilyagr
Copy link
Contributor Author

ilyagr commented Oct 27, 2025

OK, I think this is ready to go. I've marked my conversations with Martin as resolved, but anyone can feel free to reopen them if there's more to be done.

@ilyagr ilyagr marked this pull request as ready for review October 27, 2025 20:35
@ilyagr ilyagr requested a review from a team as a code owner October 27, 2025 20:35
@ilyagr ilyagr force-pushed the ig/testutils-without-git branch from 0c71b1a to 0e935c3 Compare October 27, 2025 20:41
This makes it possible to use `testutils` without depending on all of
`gix`.

Users of testutils without the Git feature would currently either have
to use the LocalBackend or provide their own replacement to `TestRepo`.

`jj-lib`'s test still depend on Git. Both before and after this PR,
`cargo test --no-build -p jj-lib --no-default-features` fails to
compile. This seems like a difficult problem to address; this PR merely
tries to not make the situation worse.

**Motivation**: In at least one ERSC use-case, we'd like to use `testutils`, but
the gix dependency makes tests crash with the following error:

```
[test]     thread 'gitoxide.in_parallel.produce.0' panicked at code/...:
[test]     there is no reactor running, must be called from the context of a Tokio 1.x runtime
```

It's not clear to me why this happens (@davidbarsky claims to have an
idea), but this PR seems like a good workaround that also decreases the
amount of things we'd need to compile.
@ilyagr ilyagr force-pushed the ig/testutils-without-git branch from 0e935c3 to 346dc09 Compare October 27, 2025 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants