Skip to content
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

gix-testtools: Upgrade versions of gix crates #1510

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

joshtriplett
Copy link
Contributor

This avoids duplicate dependencies in packages depending on both gix and
gix-testtools.

This avoids duplicate dependencies in packages depending on both gix and
gix-testtools.
@joshtriplett
Copy link
Contributor Author

joshtriplett commented Aug 11, 2024

Would it be possible to get a gix-testtools release based on this?

Also, is there some process that could avoid having gix-testtools get out of sync?

@Byron
Copy link
Member

Byron commented Aug 12, 2024

Actually, I don't think I can do that as it will break the ability of cargo smart-release to perform a release of gitoxide. Publishes fail if the test-tools use dependencies in the workspace, and using a separate set of crate versions (that also have to be one major version in the past, ideally) was the only workaround I could find. (gix-testtools seems to be special as it's used as dev-dependency in crates that are also depend on it, it's a cycle.)

I'd also love to not have this special-case, but it will probably need more time than I can invest into cargo smart-release to find a proper fix for it - it's a complex tool that was rewritten once already, yet is totally under-tested. My hopes are that one day, cargo smart-release will only be used to set the crate versions update changelogs, while cargo publish can be used to publish everything in the right order - then it should be possible to remove this special case.

@EliahKagan EliahKagan mentioned this pull request Aug 22, 2024
EliahKagan added a commit to EliahKagan/gitoxide that referenced this pull request Nov 18, 2024
The previous commit added `gix-testtools` (by relative path) as a
dev dependency of `gix-index`, so `gix_testtools::size_ok`. Because
`gix-testtools` itself depends on `gix-index` -- at an earlier
version to not break releasing with csr (see discussion in GitoxideLabs#1510
for general info) -- this causes `cargo`, when running in the top
level workspace directory, to consider `-p gix-index` without an
explicit version to be ambiguous.

This made the full CI `test` job fail when the `check` recipe
attempts to run `cargo check` on `gix-index`, with the message

    error: There are multiple `gix-index` packages in your project, and the specification `gix-index` is ambiguous.
    Please re-run this command with one of the following specifications:
      [email protected]
      [email protected]
    error: Recipe `check` failed on line 87 with exit code 101

where the line number is from the `justfile`.

To fix this, this changes the command to change to the `gix-index`
directory instead of passing `-p gix-index`. (This technique is
used elsewhere in the same recipe already.)
EliahKagan added a commit to EliahKagan/gitoxide that referenced this pull request Nov 18, 2024
The previous commit added `gix-testtools` (by relative path) as a
dev dependency of `gix-index`, to use `gix_testtools::size_ok`.
Because `gix-testtools` itself depends on `gix-index` -- at an
earlier version to not break releasing with csr (see discussion
in GitoxideLabs#1510 for general info) -- this causes `cargo`, when running in
the top level workspace directory, to consider `-p gix-index`
without an explicit version to be ambiguous.

This made the full CI `test` job fail when the `check` recipe
attempts to run `cargo check` on `gix-index`, with the message

    error: There are multiple `gix-index` packages in your project, and the specification `gix-index` is ambiguous.
    Please re-run this command with one of the following specifications:
      [email protected]
      [email protected]
    error: Recipe `check` failed on line 87 with exit code 101

where the line number is from the `justfile`.

To fix this, this changes the command to change to the `gix-index`
directory instead of passing `-p gix-index`. (This technique is
used elsewhere in the same recipe already.)
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