-
Couldn't load subscription status.
- Fork 762
testutils: make gix dependency optional #7847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
b8d7026 to
7cfebc3
Compare
7cfebc3 to
eff671e
Compare
There was a problem hiding this 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.
eff671e to
0c71b1a
Compare
|
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. |
0c71b1a to
0e935c3
Compare
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.
0e935c3 to
346dc09
Compare
See commit description.
Checklist
If applicable:
CHANGELOG.mdREADME.md,docs/,demos/)cli/src/config-schema.json)