Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2024"
crate-type = ["cdylib"]

[dependencies]
getrandom = "0.3"
getrandom = { workspace = true }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Verify that the workspace root defines getrandom dependency

# Find the workspace root Cargo.toml (should be at repository root)
if [ -f "Cargo.toml" ]; then
  echo "=== Checking root Cargo.toml for workspace.dependencies.getrandom ==="
  rg -A 2 '^\[workspace\.dependencies\]' Cargo.toml
  echo ""
  echo "=== Searching for getrandom in workspace dependencies ==="
  rg -P 'getrandom\s*=' Cargo.toml
else
  echo "ERROR: Root Cargo.toml not found"
  exit 1
fi

Repository: RustPython/RustPython

Length of output: 413


🏁 Script executed:

cat -n example_projects/wasm32_without_js/rustpython-without-js/Cargo.toml

Repository: RustPython/RustPython

Length of output: 457


Remove the [workspace] section on line 13.

The file uses workspace = true on line 10 (making it a workspace member), but the presence of [workspace] on line 13 creates a conflicting configuration. A Cargo.toml cannot simultaneously be a workspace root and a workspace member. Remove the empty [workspace] section.

Additionally, remove the empty [patch.crates-io] section on line 15 as it serves no purpose.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@example_projects/wasm32_without_js/rustpython-without-js/Cargo.toml` at line
10, This Cargo.toml is conflicting because the dependency declaration getrandom
= { workspace = true } makes the crate a workspace member while the file also
contains an empty [workspace] header and an empty [patch.crates-io] header;
remove the stray [workspace] section and the empty [patch.crates-io] section so
the manifest remains a workspace member (keep getrandom = { workspace = true }
intact).

rustpython-vm = { path = "../../../crates/vm", default-features = false, features = ["compiler"] }

[workspace]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Remove the [workspace] section — it conflicts with workspace membership.

A Cargo.toml cannot be both a workspace root (which declares [workspace]) and a workspace member (which uses workspace = true for dependencies). This configuration is invalid and will cause Cargo to fail.

Since line 10 uses workspace = true, this file should be a workspace member, not a workspace root. Remove the [workspace] section.

🔧 Proposed fix
-[workspace]
-
 [patch.crates-io]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[workspace]
[patch.crates-io]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@example_projects/wasm32_without_js/rustpython-without-js/Cargo.toml` at line
13, The Cargo.toml currently declares a workspace root via the [workspace] table
while also using workspace = true for membership; remove the conflicting
workspace root declaration by deleting the [workspace] section (the literal
"[workspace]" table) so this Cargo.toml becomes a workspace member consistent
with the existing workspace = true usage.

Expand Down
Loading