René's URL Explorer Experiment


Title: cz bump crashes with version_provider=cargo on workspace virtual manifest (missing [package] / TypeError on version.workspace) · Issue #1732 · commitizen-tools/commitizen · GitHub

Open Graph Title: cz bump crashes with version_provider=cargo on workspace virtual manifest (missing [package] / TypeError on version.workspace) · Issue #1732 · commitizen-tools/commitizen

X Title: cz bump crashes with version_provider=cargo on workspace virtual manifest (missing [package] / TypeError on version.workspace) · Issue #1732 · commitizen-tools/commitizen

Description: Description Commitizen crashes when using version_provider = "cargo" on a Cargo workspace virtual manifest (root Cargo.toml contains [workspace] and [workspace.package] but no [package]). Our workspace members inherit version via version...

Open Graph Description: Description Commitizen crashes when using version_provider = "cargo" on a Cargo workspace virtual manifest (root Cargo.toml contains [workspace] and [workspace.package] but no [package]). Our works...

X Description: Description Commitizen crashes when using version_provider = "cargo" on a Cargo workspace virtual manifest (root Cargo.toml contains [workspace] and [workspace.package] but no [package])....

Opengraph URL: https://github.com/commitizen-tools/commitizen/issues/1732

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"cz bump crashes with version_provider=cargo on workspace virtual manifest (missing [package] / TypeError on version.workspace)","articleBody":"### Description\n\nCommitizen crashes when using `version_provider = \"cargo\"` on a Cargo **workspace virtual manifest** (root `Cargo.toml` contains `[workspace]` and `[workspace.package]` but **no** `[package]`). Our workspace members inherit version via `version.workspace = true`. Running `cz bump` fails inside `commitizen/providers/cargo_provider.py` while trying to update `Cargo.lock`.\n\nThis prevents using Commitizen’s cargo provider for monorepo-style Rust workspaces where the version is centralized in `[workspace.package].version`.\n\n\n\n\n### Steps to reproduce\n\n1. Create a Cargo workspace that uses a **virtual manifest** at the root (no `[package]`), with a centralized version:\n\n   ```toml\n   # ./Cargo.toml (workspace root)\n   [workspace]\n   members = [\"crates/a\"]\n\n   [workspace.package]\n   version = \"0.1.0\"\n   edition = \"2024\"\n   ```\n\n2. Create a member crate that inherits the version via `version.workspace = true`:\n\n   ```toml\n   # ./crates/a/Cargo.toml\n   [package]\n   name = \"a\"\n   version.workspace = true\n   edition.workspace = true\n   ```\n\n3. Configure Commitizen to use the cargo provider:\n\n   ```toml\n   # ./cz.toml\n   [tool.commitizen]\n   name = \"cz_conventional_commits\"\n   version_scheme = \"semver\"\n   version_provider = \"cargo\"\n   tag_format = \"v$version\"\n   update_changelog_on_bump = true\n   ```\n\n4. Run:\n\n   ```bash\n   cz bump --yes\n   ```\n\n5. Observe the crash inside `commitizen/providers/cargo_provider.py` (during manifest parsing / Cargo.lock update).\n\n\n### Current behavior\n\n`cz bump` crashes with exceptions from `cargo_provider.py`:\n\n* `tomlkit.exceptions.NonExistentKey: 'Key \"package\" does not exist.'` (root manifest has no `[package]`)\n* then `TypeError: string indices must be integers, not 'str'` (when accessing `package_content[\"version\"][\"workspace\"]` for members)\n\nThe command terminates without completing the bump/tag operation.\n\n### Desired behavior\n\n`cz bump` should support Cargo workspaces with a **virtual manifest** (root `Cargo.toml` has `[workspace]` / `[workspace.package]` but no `[package]`) and members using `version.workspace = true`.\n\nConcretely:\n\n* Read and bump the canonical version from `[workspace.package].version`.\n* Do not assume `[package]` exists in the workspace root manifest.\n* When scanning/updating member manifests, correctly handle `version.workspace = true` (a nested table / boolean) without type errors.\n\n### Screenshots\n\n_No response_\n\n### Environment\n\n(computation) juncheng@localhost:~/projects/computation$ cz version --report\nCommitizen Version: 4.10.1\nPython Version: 3.11.12 (main, Apr  9 2025, 04:04:00) [Clang 20.1.0 ]\nOperating System: Linux","author":{"url":"https://github.com/jcfangc","@type":"Person","name":"jcfangc"},"datePublished":"2025-12-23T03:55:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1732/commitizen/issues/1732"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:bb640d6e-8343-1075-dd71-01407d8381bc
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD5FA:14FB0B:7DA8F0B:A29113E:6975C4E0
html-safe-nonce6c4a03580ba0fe1aed6cd485ac6bb1d6a7b4f417a08fc777ba3b32b4fd643831
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUZBOjE0RkIwQjo3REE4RjBCOkEyOTExM0U6Njk3NUM0RTAiLCJ2aXNpdG9yX2lkIjoiMzQ0MTMwOTIwMTU2MzIzOTY0OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac800099f45d0137f6e8405375395d049a603fd0950674a6ddb0c2efb50e8517ba
hovercard-subject-tagissue:3755933961
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/commitizen-tools/commitizen/1732/issue_layout
twitter:imagehttps://opengraph.githubassets.com/2494fbad3b535d6430fc37e8b4a39004c3a41fe6c9339d317684a8416f5ab2bf/commitizen-tools/commitizen/issues/1732
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2494fbad3b535d6430fc37e8b4a39004c3a41fe6c9339d317684a8416f5ab2bf/commitizen-tools/commitizen/issues/1732
og:image:altDescription Commitizen crashes when using version_provider = "cargo" on a Cargo workspace virtual manifest (root Cargo.toml contains [workspace] and [workspace.package] but no [package]). Our works...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejcfangc
hostnamegithub.com
expected-hostnamegithub.com
None4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f
turbo-cache-controlno-preview
go-importgithub.com/commitizen-tools/commitizen git https://github.com/commitizen-tools/commitizen.git
octolytics-dimension-user_id62252524
octolytics-dimension-user_logincommitizen-tools
octolytics-dimension-repository_id106127589
octolytics-dimension-repository_nwocommitizen-tools/commitizen
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id106127589
octolytics-dimension-repository_network_root_nwocommitizen-tools/commitizen
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release488b30e96dfd057fbbe44c6665ccbc030b729dde
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/commitizen-tools/commitizen/issues/1732#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fissues%2F1732
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcommitizen-tools%2Fcommitizen%2Fissues%2F1732
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=commitizen-tools%2Fcommitizen
Reloadhttps://patch-diff.githubusercontent.com/commitizen-tools/commitizen/issues/1732
Reloadhttps://patch-diff.githubusercontent.com/commitizen-tools/commitizen/issues/1732
Reloadhttps://patch-diff.githubusercontent.com/commitizen-tools/commitizen/issues/1732
commitizen-tools https://patch-diff.githubusercontent.com/commitizen-tools
commitizenhttps://patch-diff.githubusercontent.com/commitizen-tools/commitizen
Please reload this pagehttps://patch-diff.githubusercontent.com/commitizen-tools/commitizen/issues/1732
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Fork 314 https://patch-diff.githubusercontent.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Star 3.2k https://patch-diff.githubusercontent.com/login?return_to=%2Fcommitizen-tools%2Fcommitizen
Code https://patch-diff.githubusercontent.com/commitizen-tools/commitizen
Issues 124 https://patch-diff.githubusercontent.com/commitizen-tools/commitizen/issues
Pull requests 27 https://patch-diff.githubusercontent.com/commitizen-tools/commitizen/pulls
Discussions https://patch-diff.githubusercontent.com/commitizen-tools/commitizen/discussions
Actions https://patch-diff.githubusercontent.com/commitizen-tools/commitizen/actions
Projects 0 https://patch-diff.githubusercontent.com/commitizen-tools/commitizen/projects
Security 0 https://patch-diff.githubusercontent.com/commitizen-tools/commitizen/security
Insights https://patch-diff.githubusercontent.com/commitizen-tools/commitizen/pulse
Code https://patch-diff.githubusercontent.com/commitizen-tools/commitizen
Issues https://patch-diff.githubusercontent.com/commitizen-tools/commitizen/issues
Pull requests https://patch-diff.githubusercontent.com/commitizen-tools/commitizen/pulls
Discussions https://patch-diff.githubusercontent.com/commitizen-tools/commitizen/discussions
Actions https://patch-diff.githubusercontent.com/commitizen-tools/commitizen/actions
Projects https://patch-diff.githubusercontent.com/commitizen-tools/commitizen/projects
Security https://patch-diff.githubusercontent.com/commitizen-tools/commitizen/security
Insights https://patch-diff.githubusercontent.com/commitizen-tools/commitizen/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/commitizen-tools/commitizen/issues/1732
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/commitizen-tools/commitizen/issues/1732
#1733https://github.com/commitizen-tools/commitizen/pull/1733
cz bump crashes with version_provider=cargo on workspace virtual manifest (missing [package] / TypeError on version.workspace)https://patch-diff.githubusercontent.com/commitizen-tools/commitizen/issues/1732#top
#1733https://github.com/commitizen-tools/commitizen/pull/1733
issue-status: pr-createdhttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22issue-status%3A%20pr-created%22
os: Linuxissues related to linuxhttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22os%3A%20Linux%22
type: bughttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com/jcfangc
https://github.com/jcfangc
jcfangchttps://github.com/jcfangc
on Dec 23, 2025https://github.com/commitizen-tools/commitizen/issues/1732#issue-3755933961
issue-status: pr-createdhttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22issue-status%3A%20pr-created%22
os: Linuxissues related to linuxhttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22os%3A%20Linux%22
type: bughttps://github.com/commitizen-tools/commitizen/issues?q=state%3Aopen%20label%3A%22type%3A%20bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.