Use cargo workspace to remove duplicated version, license, and author fields - #4226
Use cargo workspace to remove duplicated version, license, and author fields#4226timon-schelling wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request migrates multiple crates within the workspace to inherit common package metadata from the workspace configuration. However, the reviewer noted that the rust-version constraint was inadvertently removed from several Cargo.toml files during this migration. It is recommended to add rust-version.workspace = true to these files to ensure all packages consistently adhere to the workspace's Rust version constraint.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| license = "MIT OR Apache-2.0" | ||
| repository = "" | ||
| edition = "2024" | ||
| rust-version = "1.87" |
| license = "MIT OR Apache-2.0" | ||
| repository = "" | ||
| edition = "2024" | ||
| rust-version = "1.87" |
| license = "MIT OR Apache-2.0" | ||
| repository = "" | ||
| edition = "2024" | ||
| rust-version = "1.87" |
| license = "MIT OR Apache-2.0" | ||
| repository = "" | ||
| edition = "2024" | ||
| rust-version = "1.87" |
| license = "MIT OR Apache-2.0" | ||
| repository = "" | ||
| edition = "2024" | ||
| rust-version = "1.87" |
| license = "MIT OR Apache-2.0" | ||
| repository = "" | ||
| edition = "2024" | ||
| rust-version = "1.87" |
| name = "graphite-editor" | ||
| publish = false | ||
| version = "0.0.0" | ||
| rust-version = "1.88" |
| name = "graphite-wasm-wrapper" | ||
| publish = false | ||
| version = "0.0.0" | ||
| rust-version = "1.88" |
| name = "node-macro" | ||
| publish = false | ||
| version = "0.0.0" | ||
| rust-version = "1.88" |
| name = "graphite-proc-macros" | ||
| publish = false | ||
| version = "0.0.0" | ||
| rust-version = "1.88" |
There was a problem hiding this comment.
4 issues found across 49 files
Confidence score: 4/5
editor/Cargo.tomlremoves package metadata that is available through[workspace.package]without inheriting it, which can leave published crate metadata incomplete—restore the corresponding workspace inheritance fields.desktop/Cargo.tomldrops the crate description even though the workspace does not provide one, reducing package metadata quality—retain or add an explicitdescription.- The PR title associated with
desktop/platform/mac/Cargo.tomluses an unapproved leading verb and misspells “duplicated,” which can fail title-policy checks and produce a poor commit message—revise the title to match the project vocabulary and spelling.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="editor/Cargo.toml">
<violation number="1" location="editor/Cargo.toml:3">
P2: Removed `rust-version`, `readme`, `homepage`, and `repository` fields without migrating them to workspace inheritance. These are all defined in `[workspace.package]` in the root `Cargo.toml`, so they should use `xxx.workspace = true` like the other fields. Currently they are silently dropped from this package.</violation>
</file>
<file name="desktop/Cargo.toml">
<violation number="1" location="desktop/Cargo.toml:8">
P3: The `description = "Graphite Desktop"` field was removed without inheriting one from the workspace, so the crate now has no description. Workspace `[workspace.package]` does not define a `description` field, so this is a net loss. Other migrated crates here (editor, desktop/wrapper) never had descriptions, so they weren't affected.</violation>
</file>
<file name="desktop/platform/mac/Cargo.toml">
<violation number="1" location="desktop/platform/mac/Cargo.toml:3">
P2: Custom agent: **PR title enforcement**
PR title starts with invalid leading verb "Use" instead of an approved action verb from the project's leading verb vocabulary</violation>
<violation number="2" location="desktop/platform/mac/Cargo.toml:3">
P2: Custom agent: **PR title enforcement**
PR title has a spelling error: "dublicated" should be "duplicated". The PR title becomes the commit message, and the project's detailed PR title style guide establishes high standards for spelling and language correctness.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| repository = "" | ||
| edition = "2024" | ||
| rust-version = "1.87" | ||
| # Inherited from workspace - start |
There was a problem hiding this comment.
P2: Custom agent: PR title enforcement
PR title has a spelling error: "dublicated" should be "duplicated". The PR title becomes the commit message, and the project's detailed PR title style guide establishes high standards for spelling and language correctness.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/platform/mac/Cargo.toml, line 3:
<comment>PR title has a spelling error: "dublicated" should be "duplicated". The PR title becomes the commit message, and the project's detailed PR title style guide establishes high standards for spelling and language correctness.</comment>
<file context>
@@ -1,12 +1,12 @@
-repository = ""
-edition = "2024"
-rust-version = "1.87"
+# Inherited from workspace - start
+version.workspace = true
+license.workspace = true
</file context>
| repository = "" | ||
| edition = "2024" | ||
| rust-version = "1.87" | ||
| # Inherited from workspace - start |
There was a problem hiding this comment.
P2: Custom agent: PR title enforcement
PR title starts with invalid leading verb "Use" instead of an approved action verb from the project's leading verb vocabulary
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/platform/mac/Cargo.toml, line 3:
<comment>PR title starts with invalid leading verb "Use" instead of an approved action verb from the project's leading verb vocabulary</comment>
<file context>
@@ -1,12 +1,12 @@
-repository = ""
-edition = "2024"
-rust-version = "1.87"
+# Inherited from workspace - start
+version.workspace = true
+license.workspace = true
</file context>
| homepage = "https://graphite.art" | ||
| repository = "https://github.com/GraphiteEditor/Graphite" | ||
| license = "MIT OR Apache-2.0" | ||
| # Inherited from workspace - start |
There was a problem hiding this comment.
P2: Removed rust-version, readme, homepage, and repository fields without migrating them to workspace inheritance. These are all defined in [workspace.package] in the root Cargo.toml, so they should use xxx.workspace = true like the other fields. Currently they are silently dropped from this package.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At editor/Cargo.toml, line 3:
<comment>Removed `rust-version`, `readme`, `homepage`, and `repository` fields without migrating them to workspace inheritance. These are all defined in `[workspace.package]` in the root `Cargo.toml`, so they should use `xxx.workspace = true` like the other fields. Currently they are silently dropped from this package.</comment>
<file context>
@@ -1,14 +1,12 @@
-homepage = "https://graphite.art"
-repository = "https://github.com/GraphiteEditor/Graphite"
-license = "MIT OR Apache-2.0"
+# Inherited from workspace - start
+version.workspace = true
+license.workspace = true
</file context>
| license.workspace = true | ||
| authors.workspace = true | ||
| edition.workspace = true | ||
| publish.workspace = true |
There was a problem hiding this comment.
P3: The description = "Graphite Desktop" field was removed without inheriting one from the workspace, so the crate now has no description. Workspace [workspace.package] does not define a description field, so this is a net loss. Other migrated crates here (editor, desktop/wrapper) never had descriptions, so they weren't affected.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At desktop/Cargo.toml, line 8:
<comment>The `description = "Graphite Desktop"` field was removed without inheriting one from the workspace, so the crate now has no description. Workspace `[workspace.package]` does not define a `description` field, so this is a net loss. Other migrated crates here (editor, desktop/wrapper) never had descriptions, so they weren't affected.</comment>
<file context>
@@ -1,12 +1,12 @@
+license.workspace = true
+authors.workspace = true
+edition.workspace = true
+publish.workspace = true
+# Inherited from workspace - end
</file context>
There was a problem hiding this comment.
can you double check if this is the case?
There was a problem hiding this comment.
@TrueDoctor Good catch — that comment doesn't hold for the current state of the PR. The description = "Graphite Desktop" field is still present in desktop/Cargo.toml; it's an unchanged context line in the diff, not a removal. The actual removals are version, authors, license, repository, edition, and rust-version, which matches the +7 -6 count on that file.
So there's no lost description, and no need to add a description to [workspace.package] for this file. If my comment was based on an intermediate diff where it looked removed, the current file content supersedes that.
One adjacent thing worth noting while you're here: the migration also drops rust-version = "1.87" from these crates (and the workspace previously had 1.87/1.88 discrepancies across crates). If [workspace.package] doesn't define rust-version, those crates will fall back to the edition default. That's a separate concern from the description claim, but it's the same "was it actually inherited?" question, so worth a quick check against the root Cargo.toml.
Tip: get faster answers by chatting with cubic’s review copilot in the review UI
689fe90 to
20b805e
Compare
6d51733 to
b86a8a9
Compare
|
I dislike the use of the use of inherited from workspace start / end comment lines |
Also happy to leave them out |
7b6bbd5 to
df599ec
Compare
df599ec to
9656f80
Compare
|
!build desktop (Run ID 34766573851) |
|
|
No description provided.