Skip to content

Let gix-testtools use gix-* workspace crates #1992

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

Merged
merged 2 commits into from
May 5, 2025

Conversation

EliahKagan
Copy link
Member

Fixes #1989

This is the PR I had promised in #1989 to demonstrate the effect of the fix proposed there. Based on the last paragraph of #1989 (comment), I am guessing that this is not suitable for merging at this time, or maybe even at all, and therefore that this is effectively just an experiment rather than something to be merged. I recommend:

  • Closing this without merging, if it is unlikely that the changes here would be wanted soon.
  • Marking it as a draft (or asking me to do so) if the changes here might be wanted soon.
  • Merging this if the changes are wanted now, though my understanding of what you have said makes me suspect that is not the case.

(The "other tradeoffs to consider" that I had alluded to in the description of #1989 are detailed in the bulleted list under "However:" in the commit message for the first commit here, 7e057f2. However, if this should not be integrated due to cargo-smart-release possibly not being ready for it, then it may not be necessary to look at that.)

EliahKagan added 2 commits May 4, 2025 22:42
`gix-testtools` depends on several other `gix-*` crates. Before
version 0.16.1 (GitoxideLabs#1972), `gix-testtools` depended on prior breaking
versions of those crates (as discussed in GitoxideLabs#1510 and GitoxideLabs#1886). Since
then, it depends on the current versions.

When depending on a strictly earlier version, it was necessary to
omit `path =` in the `gix-testtools` manifest for its `gix-*`
dependencies. Now that `gix-testtools` depends on current versions
of those dependencies, it seems feasible to specify both `version`
and `path`, as we do in other cases where one crate developed in
this workspace depends on another crate developed in the workspace.

Aside from improving general consistency (which is a weak rationale
here, since the role of `gix-testtools` differs substantially from
that of other `gix-*` crates, in terms of how we're ourselves using
it), the broad benefits here are that:

1. Ambiguity in what crate is meant, when an operation is performed
   on a specific `gix-*` crate, is lessened, or maybe even
   eliminated. (GitoxideLabs#1989)

2. Because the code of the dependency comes from the workspace when
   applicable, i.e. when `gix-testtools` is itself being used in
   the workspace, it should allow new not-yet-published
   functionality to be leveraged in `gix-testtools`, without
   confusion or breakage. (GitoxideLabs#1886)

Before this, some actions we'd prefer to do by `<cmd> -p <crate>`
had to be done by `(cd <crate-dir>; <cmd>)`. This was needed to
operate on `gix-*` crates in the workspace that are also
dependencies, even transitively, of `gix-testtools`.

This affected some commands in `justfile` recipes, some commands
run in CI workflows (indirectly via `just`, or directly in script
steps), and some operations carried out manually. This included
`cargo nextest run` and `cargo check` on various crates.

Here's an example (shown on Windows, but this problem was not
specific to Windows) using `gix-date`, which is not listed in
`tests/tools/Cargo.toml`, but which is a transitive dependency:

    C:\Users\ek\source\repos\gitoxide [main ≡]> cargo nextest run -p gix-date
        Blocking waiting for file lock on package cache
    error: There are multiple `gix-date` packages in your project, and the specification `gix-date` is ambiguous.
    Please re-run this command with one of the following specifications:
      path+file:///C:/Users/ek/source/repos/gitoxide/gix-date#0.10.1
      registry+https://github.com/rust-lang/crates.io-index#[email protected]
    error: command `'\\?\C:\Users\ek\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin\cargo.exe' test --no-run --message-format json-render-diagnostics --package gix-date` exited with code 101

An important special case is that of editor/IDE integration,
especially in VS Code. This couldn't run and (more significantly,
in view of the benefit of integration) couldn't debug some of the
tests.

This happened because synthesized `cargo test -p ...` commands,
used behind the scenes to launch the tests, were ambiguous. For
further details, see GitoxideLabs#1989.

Another benefit is that the lockfile and dependency tree are
simpler, and the dependency tree is truly unified.

That points to an important aspect of this change, which is more
than a refactoring and will affect test behavior:

- It shouldn't produce different behavior when `gix-testtools` is
  obtained from crates.io (i.e. when projects developed outside the
  `gitoxide` repository use `gix-testtools`), it can produce
  different behavior here, where `gix-testtools` will use changes
  to its `gix-*` dependencies (and accordingly their own
  dependencies, recursively) that are present in the workspace even
  if not present in the released version that matches `version =`.

- That could be a good thing if it causes new changes to be
  exercised more and earlier. That might help find bugs.

- This is also desirable in that it allows feature changes and
  bugfixes in `gix-*` crates to be used immediately in
  `gix-testtools`, before either those `gix-*` crates or
  `gix-testtools` are published with the changes (GitoxideLabs#1886). But...

However:

- It could be bad if it introduces an undesirable dependency
  ordering for fixing bugs and/or introducing regression tests.

  That is, in principle there could arise two (possibly related)
  bugs, A and B, where there is some reason to fix A before B, but
  where B must be fixed in order for the regression test for A to
  run (to validate that it can catch A), due to B breaking
  `gix-testtools` as used in the test for A or in other tests in
  the crate affected by A.

  Because this would presumably be known--an error would occur,
  likely when building the tests--it could be worked around by
  temporarily (or permanently) reverting this change if and when
  such a problem ever arises, or partially undoing it for the
  specific affected `gix-*` dependency of `gix-testtools`.

- It could be bad if a bug affects a `gix-*` crate and its own
  tests in identical or complementary ways, and this is used to
  establish or check an expectation.

  That is, in principle there could arise a bug in a `gix-*` crate
  that `gix-testtools` uses, and that itself uses `gix-testtools`
  in its tests, that causes a test that should catch that bug
  (either initially or to verify a bugfix) to wrongly report that
  the code is working.

  This scenario is a case of the general problem that duplicated
  logic between code and its tests can cause a bug to appear
  (either in the same form or in different forms) in both, such
  that tests that should catch the bug don't catch it because they
  suffer from the same bug. In the hypothetical case imagined here,
  the duplication of logic would arise from the tests calling and
  using the very code that is under test.

  For the way we are currently using or likely ever to use
  `gix-testtools`, it seems like this would probably not happen.
  But it is hard to be completely sure. Unlike the previously
  described scenario, if this scenario did occur, it would likely
  not be noticed.

Both those problem scenarios have corresponding scenarios that had
already applied (and which the change here at least slightly
*mitigates*): if the code with the bug has already been published.

This fixes GitoxideLabs#1989 and makes progress toward GitoxideLabs#1886.
The previous commit notes:

> Before this, some actions we'd prefer to do by `<cmd> -p <crate>`
> had to be done by `(cd <crate-dir>; <cmd>)`. This was needed to
> operate on `gix-*` crates in the workspace that are also
> dependencies, even transitively, of `gix-testtools`.

All occurrences of `cd ...` followed immediately by a `cargo`
command in the `justfile` and in `ci.yml` were for that reason.

This commit changes them to use `-p` instead. The changes in the
`justfile` affect both manual runs and runs on CI through the
`test` job. The changes directly in `ci.yml` affect the `wasm`
jobs.

This is intended to be a refactoring. No change is anticipated in
what tests are run, their features, or their behavior.

The rationale is twofold:

- Simplify the commands. This is the form most other such commmands
  were already written in. These seem to have been written in the
  `cd` form only as a workaround for the now-fixed `-p` ambiguity.

- Verify that the fix actually works and that there is nothing else
  breaking these checks when they are run from the top level of the
  workspace.
@Byron
Copy link
Member

Byron commented May 5, 2025

Thanks a lot!

This PR is definitely wanted, and I marked it as draft to indicate that I hope to try it out locally to at least create an issue in CSR to be able to tackle the resulting issues at some time.
In theory, you should be able to try and create a publish, it should fail right away (and if not it will fail due to permissions), but I'd think it doesn't get that far.

@EliahKagan
Copy link
Member Author

Should I attempt a dry-run publish? Alternatively, is cargo-smart-release working with custom registries? I think you had mentioned that using a local registry for testing would be helpful.

@Byron
Copy link
Member

Byron commented May 5, 2025

You could try a dry-run, but if that doesn't run into problem, doing a real run would be fine too - I'd expect it to run into trouble before it bumps into permissions errors. If it seems to work I will try myself.

Which reminds me… probably it would be best to just merge this PR to assure I will track the issues that arise from it, and I will revert it when I have to.

@EliahKagan
Copy link
Member Author

I'd expect it to run into trouble before it bumps into permissions errors.

I worry that, if something goes unexpectedly, then it might somehow try to push tags, which I think would succeed, since I have the ability to do that. Though I could try to run it in an environment where git cannot push to the repository. Anyway, I suppose it would not get that far, since it attempts to publish first.

Which reminds me… probably it would be best to just merge this PR to assure I will track the issues that arise from it, and I will revert it when I have to.

That makes sense, and perhaps should've been listed as a fourth bullet point in my description here.

A possible variant could be to merge only the first commit, since the second commit makes changes that rely on it. But the second commit also serves to test the effect of the first commit, so I would suggest merging the PR as a whole and then just reverting the whole thing if need be.

@Byron
Copy link
Member

Byron commented May 5, 2025

I worry that, if something goes unexpectedly, then it might somehow try to push tags, which I think would succeed, since I have the ability to do that. Though I could try to run it in an environment where git cannot push to the repository. Anyway, I suppose it would not get that far, since it attempts to publish first.

That's a very valid point and a great catch! Fortunately there is a cure, --no-tag and/or --no-push.

In any case, let's merge to get the ball rolling.

@Byron Byron marked this pull request as ready for review May 5, 2025 06:52
@Byron Byron merged commit 6acdc04 into GitoxideLabs:main May 5, 2025
22 checks passed
@EliahKagan
Copy link
Member Author

Fortunately there is a cure, --no-tag and/or --no-push.

Thanks--I should've checked for such options!

@EliahKagan EliahKagan deleted the run-ci/ouroboros branch May 5, 2025 06:59
@EliahKagan
Copy link
Member Author

EliahKagan commented May 10, 2025

In case it is of interest, at the current main (33c4d6b):

ek in 🌐 catenary in gitoxide on  main is 📦 v0.44.0 via 🦀 v1.86.0
❯ cargo smart-release --execute --no-push --update-crates-index
[INFO ] Updating crates-io index
[WARN ] Using 'gitoxide' as crate name as no one was provided. Specify one if this isn't correct
[INFO ] gitoxide: Tracking top-level crate's changes in multi-crate workspace through 'src/' directory only.
[INFO ] Will not publish or alter 43 dependent crates: unchanged = 'gix-utils', 'gix-actor', 'gix-trace', 'gix-validate', 'gix-features', 'gix-hash', 'gix-hashtable', 'gix-object', 'gix-glob', 'gix-quote', 'gix-attributes', 'gix-command', 'gix-packetline-blocking', 'gix-filter', 'gix-fs', 'gix-chunk', 'gix-commitgraph', 'gix-revwalk', 'gix-worktree-stream', 'gix-bitmap', 'gix-tempfile', 'gix-lock', 'gix-config-value', 'gix-ignore', 'gix-worktree', 'gix-sec', 'gix-config', 'gix-url', 'gix-credentials', 'gix-discover', 'gix-dir', 'gix-mailmap', 'gix-revision', 'gix-merge', 'gix-negotiate', 'gix-pack', 'gix-refspec', 'gix-shallow', 'gix-packetline', 'gix-status', 'gix-submodule', 'gix-worktree-state', 'gix-fsck'
[INFO ] Will auto-bump dependent package 'gix-date' from 0.10.1 to 0.10.2 for publishing
[INFO ] Will auto-bump dependent package 'gix-path' from 0.10.17 to 0.10.18 for publishing
[INFO ] Will auto-bump dependent package 'gix-traverse' from 0.46.1 to 0.46.2 for publishing
[INFO ] Will auto-bump dependent package 'gix-archive' from 0.21.1 to 0.21.2 for publishing
[INFO ] Will auto-bump dependent package 'gix-index' from 0.40.0 to 0.40.1 for publishing
[INFO ] Will auto-bump dependent package 'gix-pathspec' from 0.11.0 to 0.11.1 for publishing
[INFO ] Will auto-bump dependent package 'gix-diff' from 0.52.1 to 0.52.2 for publishing
[INFO ] Will auto-bump dependent package 'gix-blame' from 0.2.1 to 0.3.0 for publishing
[INFO ] Will auto-bump dependent package 'gix-ref' from 0.52.1 to 0.52.2 for publishing
[INFO ] Will auto-bump dependent package 'gix-prompt' from 0.11.0 to 0.11.1 for publishing
[INFO ] Will auto-bump dependent package 'gix-odb' from 0.69.1 to 0.69.2 for publishing
[INFO ] Will auto-bump dependent package 'gix-transport' from 0.47.0 to 0.47.1 for publishing
[INFO ] Will auto-bump dependent package 'gix-protocol' from 0.50.1 to 0.50.2 for publishing
[INFO ] Will auto-bump dependent package 'gix' from 0.72.1 to 0.73.0 for publishing, for SAFETY due to breaking package 'gix-blame', ignoring computed version 0.72.2
[INFO ] Will auto-bump dependent package 'gitoxide-core' from 0.47.1 to 0.48.0 for publishing, for SAFETY due to breaking package 'gix-blame', ignoring computed version 0.47.2
[INFO ] Will auto-bump provided package 'gitoxide' from 0.44.0 to 0.45.0 for publishing, for SAFETY due to breaking package 'gix-blame', ignoring computed version 0.44.1
[INFO ] Will adjust 3 manifest versions due to breaking change in 'gix-blame': 'gix' 0.72.1 ➡ 0.73.0, 'gitoxide-core' 0.47.1 ➡ 0.48.0, 'gitoxide' 0.44.0 ➡ 0.45.0
[INFO ] Will adjust version constraints in manifest of 1 package as direct dependencies are changing: internal-tools
[DEBUG] Tracking package named "gix-date" as "git-date"
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[INFO ] Will modify existing changelog for 'gix-date'.
[DEBUG] Tracking package named "gix-path" as "git-path"
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle Start(Paragraph)
[TRACE] Cannot handle Text(Borrowed("This makes things more robust overall than either preferring the"))
[TRACE] Cannot handle SoftBreak
[TRACE] Cannot handle Text(Borrowed("non-shim or just doing a path search for "))
[TRACE] Cannot handle Code(Borrowed("sh"))
[TRACE] Cannot handle Text(Borrowed(" as was done before"))
[TRACE] Cannot handle SoftBreak
[TRACE] Cannot handle Text(Borrowed("that. But it exacerbates #1868 (as described there), so if the"))
[TRACE] Cannot handle SoftBreak
[TRACE] Cannot handle Text(Borrowed("Git for Windows "))
[TRACE] Cannot handle Code(Borrowed("sh.exe"))
[TRACE] Cannot handle Text(Borrowed(" shim continues to work as it currently"))
[TRACE] Cannot handle SoftBreak
[TRACE] Cannot handle Text(Borrowed("does, then further improvements may be called for here."))
[TRACE] Cannot handle End(Paragraph)
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(Some(2)))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle Start(Item)
[TRACE] Cannot handle Text(Borrowed("https://github.com/Byron/gitoxide/security/advisories/GHSA-mgvv-9p9g-3jv4"))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[INFO ] Will modify existing changelog for 'gix-path'.
[DEBUG] Tracking package named "gix-traverse" as "git-traverse"
[INFO ] Will modify existing changelog for 'gix-traverse'.
[INFO ] Will modify existing changelog for 'gix-archive'.
[DEBUG] Tracking package named "gix-index" as "git-index"
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[INFO ] Will modify existing changelog for 'gix-index'.
[DEBUG] Tracking package named "gix-pathspec" as "git-pathspec"
[INFO ] Will modify existing changelog for 'gix-pathspec'.
[DEBUG] Tracking package named "gix-diff" as "git-diff"
[INFO ] Will modify existing changelog for 'gix-diff'.
[INFO ] Will modify existing changelog for 'gix-blame'.
[DEBUG] Tracking package named "gix-ref" as "git-ref"
[INFO ] Will modify existing changelog for 'gix-ref'.
[DEBUG] Tracking package named "gix-prompt" as "git-prompt"
[INFO ] Will modify existing changelog for 'gix-prompt'.
[DEBUG] Tracking package named "gix-odb" as "git-odb"
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[INFO ] Will modify existing changelog for 'gix-odb'.
[DEBUG] Tracking package named "gix-transport" as "git-transport"
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[INFO ] Will modify existing changelog for 'gix-transport'.
[DEBUG] Tracking package named "gix-protocol" as "git-protocol"
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[INFO ] Will modify existing changelog for 'gix-protocol'.
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[INFO ] Will modify existing changelog for 'gix'.
[DEBUG] Tracking package named "gitoxide-core" as "git-core"
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[INFO ] Will modify existing changelog for 'gitoxide-core'.
[INFO ] gitoxide: Tracking top-level crate's changes in multi-crate workspace through 'src/' directory only.
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[TRACE] Cannot handle End(Item)
[TRACE] Cannot handle End(List(None))
[INFO ] Will modify existing changelog for 'gitoxide'.
[TRACE] Pending 'gix-date' manifest version update: "0.10.2"
[TRACE] Pending 'gix-path' manifest version update: "0.10.18"
[TRACE] Pending 'gix-traverse' manifest version update: "0.46.2"
[TRACE] Pending 'gix-traverse' conservative manifest dependencies update: 'gix-date = "^0.10.2"' (from  "^0.10.1")
[TRACE] Pending 'gix-archive' manifest version update: "0.21.2"
[TRACE] Pending 'gix-archive' conservative manifest dependencies update: 'gix-date = "^0.10.2"' (from  "^0.10.1")
[TRACE] Pending 'gix-archive' conservative manifest dependencies update: 'gix-path = "^0.10.18"' (from  "^0.10.17")
[TRACE] Pending 'gix-index' manifest version update: "0.40.1"
[TRACE] Pending 'gix-index' conservative manifest dependencies update: 'gix-traverse = "^0.46.2"' (from  "^0.46.1")
[TRACE] Pending 'gix-pathspec' manifest version update: "0.11.1"
[TRACE] Pending 'gix-pathspec' conservative manifest dependencies update: 'gix-path = "^0.10.18"' (from  "^0.10.17")
[TRACE] Pending 'gix-diff' manifest version update: "0.52.2"
[TRACE] Pending 'gix-diff' conservative manifest dependencies update: 'gix-path = "^0.10.18"' (from  "^0.10.17")
[TRACE] Pending 'gix-diff' conservative manifest dependencies update: 'gix-traverse = "^0.46.2"' (from  "^0.46.1")
[TRACE] Pending 'gix-diff' conservative manifest dependencies update: 'gix-index = "^0.40.1"' (from  "^0.40.0")
[TRACE] Pending 'gix-diff' conservative manifest dependencies update: 'gix-pathspec = "^0.11.1"' (from  "^0.11.0")
[TRACE] Pending 'gix-blame' manifest version update: "0.3.0"
[TRACE] Pending 'gix-blame' conservative manifest dependencies update: 'gix-date = "^0.10.2"' (from  "^0.10.1")
[TRACE] Pending 'gix-blame' conservative manifest dependencies update: 'gix-traverse = "^0.46.2"' (from  "^0.46.1")
[TRACE] Pending 'gix-blame' conservative manifest dependencies update: 'gix-diff = "^0.52.2"' (from  "^0.52.1")
[TRACE] Pending 'gix-ref' manifest version update: "0.52.2"
[TRACE] Pending 'gix-ref' conservative manifest dependencies update: 'gix-path = "^0.10.18"' (from  "^0.10.17")
[TRACE] Pending 'gix-prompt' manifest version update: "0.11.1"
[TRACE] Pending 'gix-odb' manifest version update: "0.69.2"
[TRACE] Pending 'gix-odb' conservative manifest dependencies update: 'gix-date = "^0.10.2"' (from  "^0.10.1")
[TRACE] Pending 'gix-odb' conservative manifest dependencies update: 'gix-path = "^0.10.18"' (from  "^0.10.17")
[TRACE] Pending 'gix-transport' manifest version update: "0.47.1"
[TRACE] Pending 'gix-protocol' manifest version update: "0.50.2"
[TRACE] Pending 'gix-protocol' conservative manifest dependencies update: 'gix-date = "^0.10.2"' (from  "^0.10.1")
[TRACE] Pending 'gix-protocol' conservative manifest dependencies update: 'gix-ref = "^0.52.2"' (from  "^0.52.1")
[TRACE] Pending 'gix-protocol' conservative manifest dependencies update: 'gix-transport = "^0.47.1"' (from  "^0.47.0")
[TRACE] Pending 'gix' manifest version update: "0.73.0"
[TRACE] Pending 'gix' conservative manifest dependencies update: 'gix-date = "^0.10.2"' (from  "^0.10.1")
[TRACE] Pending 'gix' conservative manifest dependencies update: 'gix-path = "^0.10.18"' (from  "^0.10.17")
[TRACE] Pending 'gix' conservative manifest dependencies update: 'gix-traverse = "^0.46.2"' (from  "^0.46.1")
[TRACE] Pending 'gix' conservative manifest dependencies update: 'gix-archive = "^0.21.2"' (from  "^0.21.1")
[TRACE] Pending 'gix' conservative manifest dependencies update: 'gix-index = "^0.40.1"' (from  "^0.40.0")
[TRACE] Pending 'gix' conservative manifest dependencies update: 'gix-pathspec = "^0.11.1"' (from  "^0.11.0")
[TRACE] Pending 'gix' conservative manifest dependencies update: 'gix-diff = "^0.52.2"' (from  "^0.52.1")
[TRACE] Pending 'gix' manifest dependencies update: 'gix-blame = "^0.3.0"' (from  "^0.2.1")
[TRACE] Pending 'gix' conservative manifest dependencies update: 'gix-ref = "^0.52.2"' (from  "^0.52.1")
[TRACE] Pending 'gix' conservative manifest dependencies update: 'gix-prompt = "^0.11.1"' (from  "^0.11.0")
[TRACE] Pending 'gix' conservative manifest dependencies update: 'gix-odb = "^0.69.2"' (from  "^0.69.1")
[TRACE] Pending 'gix' conservative manifest dependencies update: 'gix-transport = "^0.47.1"' (from  "^0.47.0")
[TRACE] Pending 'gix' conservative manifest dependencies update: 'gix-protocol = "^0.50.2"' (from  "^0.50.1")
[TRACE] Pending 'gitoxide-core' manifest version update: "0.48.0"
[TRACE] Pending 'gitoxide-core' conservative manifest dependencies update: 'gix-archive-for-configuration-only = "^0.21.2"' (from  "^0.21.1")
[TRACE] Pending 'gitoxide-core' conservative manifest dependencies update: 'gix-transport-configuration-only = "^0.47.1"' (from  "^0.47.0")
[TRACE] Pending 'gitoxide-core' manifest dependencies update: 'gix = "^0.73.0"' (from  "^0.72.1")
[TRACE] Pending 'gitoxide' manifest version update: "0.45.0"
[TRACE] Pending 'gitoxide' manifest dependencies update: 'gix = "^0.73.0"' (from  "^0.72.1")
[TRACE] Pending 'gitoxide' manifest dependencies update: 'gitoxide-core = "^0.48.0"' (from  "^0.47.1")
[TRACE] Pending 'internal-tools' manifest dependencies update: 'gix = "^0.73.0"' (from  "^0.72.1")
[TRACE] Will persist changes to 17 manifests and 16 changelogs with: "Adjusting changelogs prior to release of gix-date v0.10.2, gix-path v0.10.18, gix-traverse v0.46.2, gix-archive v0.21.2, gix-index v0.40.1, gix-pathspec v0.11.1, gix-diff v0.52.2, gix-blame v0.3.0, gix-ref v0.52.2, gix-prompt v0.11.1, gix-odb v0.69.2, gix-transport v0.47.1, gix-protocol v0.50.2, gix v0.73.0, gitoxide-core v0.48.0, gitoxide v0.45.0, safety bump 3 crates\n\nSAFETY BUMP: gix v0.73.0, gitoxide-core v0.48.0, gitoxide v0.45.0"
[INFO ] About to preview 16 pending changelog(s), use --no-changelog-preview to disable or Ctrl-C to abort, or the 'changelog' subcommand.
[TRACE] Will run "git" "commit" "-am" "Adjusting changelogs prior to release of gix-date v0.10.2, gix-path v0.10.18, gix-traverse v0.46.2, gix-archive v0.21.2, gix-index v0.40.1, gix-pathspec v0.11.1, gix-diff v0.52.2, gix-blame v0.3.0, gix-ref v0.52.2, gix-prompt v0.11.1, gix-odb v0.69.2, gix-transport v0.47.1, gix-protocol v0.50.2, gix v0.73.0, gitoxide-core v0.48.0, gitoxide v0.45.0, safety bump 3 crates\n\nSAFETY BUMP: gix v0.73.0, gitoxide-core v0.48.0, gitoxide v0.45.0"
[main 8c620a3be] Adjusting changelogs prior to release of gix-date v0.10.2, gix-path v0.10.18, gix-traverse v0.46.2, gix-archive v0.21.2, gix-index v0.40.1, gix-pathspec v0.11.1, gix-diff v0.52.2, gix-blame v0.3.0, gix-ref v0.52.2, gix-prompt v0.11.1, gix-odb v0.69.2, gix-transport v0.47.1, gix-protocol v0.50.2, gix v0.73.0, gitoxide-core v0.48.0, gitoxide v0.45.0, safety bump 3 crates
 29 files changed, 9446 insertions(+), 9128 deletions(-)
Error: Write changelog entries for crate(s) gix-date, gix-path, gix-archive, gix-pathspec, gix-diff, gix-ref, gix-prompt, gix-odb, gix-transport, gix-protocol, gitoxide-core and try again

All changelogs looked reasonable when previewed. I don't know if there are other steps that are needed, or if the error is due to an anticipated problem, or unrelated.

The changes in the generated commit were as shown here (full content), as produced by git show.

Edit: I haven't done much to look into this so far, because I wanted to post this in case it turns out to be relevant for crate releases to help get #2005 out. But I'm hoping it's enough to release a patch version of gix-index (see #2005 (comment)) and that any cargo-smart-release complexities related to the processing of circular dependencies would not create a problem for that.

@Byron
Copy link
Member

Byron commented May 10, 2025

gix-index could be released without problems, which gives me hope that a future gix release will have none either.

@EliahKagan
Copy link
Member Author

EliahKagan commented May 11, 2025

gix-index could be released without problems, which gives me hope that a future gix release will have none either.

Could this have worked because gix-testtools was neither among the packages released, nor among those whose dependency version changed? Here's a cargo tree --workspace diff from 33c4d6b to c3f06ae, which I think the covers the changes in yesterday's release of gix-index and a few other crates in #2009. (The output of cargo tree --workspace does not change from c3f06ae to fdfb239, so this might alternatively be described as a diff from fdfb239 to c3f06ae.)

I don't know how to investigate the behavior of any current or past cargo-smart-release on a past version of a real-world workspace like gitoxide, because I don't know how (or even whether there is any reliable way) to achieve an effect like --update-crates-index but only allow information up to some past point in time. This is why I haven't attempted to synthesize what would have happened if #1510 had been applied and a released had made, even though it would be useful to compare to that.

Do you think it's okay to move forward with work on things like #1886 that rely on the changes here?

@Byron
Copy link
Member

Byron commented May 11, 2025

That's probably the reason - if gix-testtools isn't involved, it makes sense that there is none of the expected issues.

Do you think it's okay to move forward with work on things like #1886 that rely on the changes here?

To me it makes sense even if just to gather data and approach the problem in a more rational way than it was handled before. My thinking is that I should be able to workaround the problem after gather said data, making it nothing more than an inconvenience when publishing. It will, however, pave the way for a fix or automated workaround.

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.

Can't run/debug tests in VS Code for crates gix-testtools depends on
2 participants