| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
⚠️ JUnit XML file not foundThe CLI was unable to find any JUnit XML files to upload. |
Sorry, something went wrong.
…ommitizen-tools#2009) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When iterating workspace members in `CargoProvider.set_lock_version`, the code subscripted `package["version"]["workspace"]` inside a try/except block that only caught `NonExistentKey`. If a member's `Cargo.toml` declared a hardcoded version (`version = "x.y.z"`) instead of `version.workspace = true`, `package["version"]` was a tomlkit `String` and the subscript raised `TypeError: string indices must be integers, not 'str'`, which was not caught and propagated as a crash. Replace the exception-driven check with an `isinstance` type guard so the inheritance lookup only runs when `version` is an actual table. Fixes commitizen-tools#2001 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
….12.1,<3.8 (commitizen-tools#2021) Signed-off-by: dependabot[bot] <support@github.com>
…itizen-tools#2022) Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
…ols#2029) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
…ols#2037) Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: dependabot[bot] <support@github.com>
…=0.9.17,<0.13 (commitizen-tools#2039) Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Tim Hsiung <26526132+bearomorphism@users.noreply.github.com>
…tools#2059) Signed-off-by: dependabot[bot] <support@github.com>
cz init already treated prek as installed, but always ran `pre-commit install`, which raised FileNotFoundError when only prek was on PATH. Use the available installer, and ask when both exist. Fixes commitizen-tools#2018
If neither pre-commit nor prek is on PATH, skip the hook-type question instead of failing init. Users who want hooks can install a tool and retry.
The InitFailedError branch in _ask_hook_installer was flagged by codecov as the only uncovered line of the PR. Add a test where the installer is available during the hook-type question but disappears before the install step, so the guard is exercised instead of removed.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* ci: restore changelog updates Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * ci: configure changelog updates on bump Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
I checked the fix for #2001 proposed by pull request #2002 and preferred to keep the fix I'm proposing in that pull request. The merged fix introduces a regression, since the try: expect: NonExistentKey block was removed, even though the "version" key is optional for a package. @bearomorphism @Lee-W @woile , do you know if a review of this pull request is planned? Until it's merged, it's not possible to publish to crates.io with commitizen in a Rust project with a workspace. To recall the objective of this PR, a project may have a Cargo.toml like this: [workspace]
members = ["members/*"]
resolver = "2"
[workspace.package]
edition = "2024"
version = "0.1.0"
[workspace.dependencies]
member-hello = { path = "members/hello" }And the Cargo.toml of the workspace member: [package]
name = "member-hello"
version.workspace = trueIn order to publish on crates.io (cargo publish --workspace), every dependency MUST have a specified version, so we need something like: [workspace.dependencies]
member-hello = { path = "members/hello", version = "0.1.0" }But this version is dynamically resolved (because the workspace member has version.workspace = true). So when we want to cz bump:
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
This PR makes 2 things:
Regarding the second point, to provide more details, crates.io requires that each crate have a version specified in Cargo.toml. For projects that use a workspace, this means that all members using version.workspace = true must also have a version specified at the workspace.dependencies level (the specified version must be the same as that of workspace.version).
When performing a version bump, in addition to updating workspace.version (in Cargo.toml) and the versions in Cargo.lock, we must also update the versions specified in Cargo.toml, since they are actually dynamically managed by Cargo via version.workspace = true.
Projects such as crate-ci/cargo-release or pksunkara/cargo-workspaces also use the same process
Checklist
Was generative AI tooling used to co-author this PR?
no
Code Changes