Skip to content

Add dependency groups to dependabot.yml#7026

Merged
youknowone merged 1 commit into
RustPython:mainfrom
fanninpm:dependabot-groups
Feb 6, 2026
Merged

Add dependency groups to dependabot.yml#7026
youknowone merged 1 commit into
RustPython:mainfrom
fanninpm:dependabot-groups

Conversation

@fanninpm

@fanninpm fanninpm commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

This is so that Dependabot can automatically update, e.g., all of the malachite dependencies in a single PR, rather than having to depend on opening multiple PRs.

Summary by CodeRabbit

  • Chores
    • Updated dependency management configuration to establish organized grouping across multiple package categories, including cranelift, criterion, futures, serde, TLS, wasm-bindgen, wasmtime, and various num-related packages. This strategic reorganization enables more precise, coordinated, and targeted dependency updates across the entire dependency ecosystem, significantly improving overall efficiency and coordination of dependency maintenance operations.

@coderabbitai

coderabbitai Bot commented Feb 6, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This pull request modifies the Dependabot configuration file to introduce structured cargo update grouping with multiple named groups for different crate categories (cranelift, criterion, futures, num-*, serde, TLS, wasm-bindgen, wasmtime, and others), enabling more granular dependency update scopes alongside a minor formatting adjustment.

Changes

Cohort / File(s) Summary
Dependabot Configuration
.github/dependabot.yml
Adds new cargo update grouping section with multiple named groups containing pattern filters for categorized crates (cranelift, criterion, futures, num-*, serde, TLS, wasm-bindgen, wasmtime, etc.) to enable targeted dependency updates per group; includes minor indentation adjustment to existing ignore entry.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A rabbit hops through grouping rules so fine,
Dependabot's garden now grows in line,
Each crate finds its place, organized with care,
Cranelift, serde, futures everywhere! 🌱

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding dependency groups to the dependabot.yml configuration file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/dependabot.yml:
- Around line 83-87: The dependabot group currently lists "serde_core" which is
a transitive dependency (present in Cargo.lock but not in any Cargo.toml);
remove "serde_core" from the serde group in the dependabot.yml so only direct
packages ("serde", "serde_derive") are grouped, or if you intentionally need to
pin it, document why and add a direct dependency declaration to Cargo.toml;
search for the serde group entry and remove the "serde_core" pattern or replace
it with a comment explaining the intent.
🧹 Nitpick comments (1)
.github/dependabot.yml (1)

94-96: The time* pattern is fairly broad.

This would match any crate starting with time, which could inadvertently group unrelated crates (e.g., timed, timeout, timestamp). Since Dependabot only considers crates actually in your dependency tree this is unlikely to be a problem in practice, but if you want to be precise, "time" and "time-*" as two separate patterns would be safer.

Tighter pattern suggestion
      time:
        patterns:
-          - "time*"
+          - "time"
+          - "time-*"

Comment thread .github/dependabot.yml
Comment on lines +83 to +87
serde:
patterns:
- "serde"
- "serde_core"
- "serde_derive"

@coderabbitai coderabbitai Bot Feb 6, 2026

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 | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if serde_core appears in any Cargo.toml or Cargo.lock
echo "=== Checking Cargo.lock ==="
rg -n 'serde_core' Cargo.lock || echo "Not found in Cargo.lock"

echo ""
echo "=== Checking Cargo.toml files ==="
fd 'Cargo.toml' --exec rg -l 'serde_core' {} || echo "Not found in any Cargo.toml"

Repository: RustPython/RustPython

Length of output: 373


Reconsider including serde_core in the groups section—it appears to be a transitive dependency, not a direct one.

serde_core is present in Cargo.lock but not declared in any Cargo.toml file, meaning it's a transitive dependency that will be pulled in by another package. Including transitive dependencies explicitly in Dependabot groups is usually unnecessary since they're updated indirectly through their parent packages. Consider removing it or investigating whether explicit grouping here serves a specific purpose you need to maintain.

🤖 Prompt for AI Agents
In @.github/dependabot.yml around lines 83 - 87, The dependabot group currently
lists "serde_core" which is a transitive dependency (present in Cargo.lock but
not in any Cargo.toml); remove "serde_core" from the serde group in the
dependabot.yml so only direct packages ("serde", "serde_derive") are grouped, or
if you intentionally need to pin it, document why and add a direct dependency
declaration to Cargo.toml; search for the serde group entry and remove the
"serde_core" pattern or replace it with a comment explaining the intent.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

How can we ensure that transitive dependencies are upgraded in lockstep with direct dependencies?

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.

@fanninpm Great question! In the Cargo ecosystem, transitive dependencies are automatically upgraded in lockstep with their direct dependencies when Dependabot (or cargo update) updates the Cargo.lock file. Here's how it works:

How Cargo Handles Transitive Dependencies

When Dependabot updates a direct dependency like serde:

  1. It runs cargo update for that package
  2. Cargo automatically resolves and updates all transitive dependencies (like serde_core) to versions compatible with the new direct dependency version
  3. The entire dependency tree is updated atomically in Cargo.lock

Dependabot Groups and Transitive Dependencies

You don't need to explicitly include transitive dependencies in Dependabot groups because:

  • Dependabot respects Cargo's dependency resolution
  • When serde is updated, serde_core will automatically be updated to the version that serde requires
  • Including serde_core explicitly in the group pattern won't change this behavior since it's not in any Cargo.toml

Recommendation

For the serde group, you can safely keep just the direct dependencies:

serde:
  patterns:
    - "serde"
    - "serde_derive"

The transitive dependency serde_core will still be updated whenever serde is updated—the grouping just controls which direct dependency updates are batched together in a single PR. If serde_core isn't a direct dependency, the pattern won't match anything anyway, so including it is harmless but unnecessary.

If you have concerns about specific transitive dependency versions, you can make them direct dependencies by adding them to your Cargo.toml with explicit version requirements.

@youknowone youknowone merged commit f968629 into RustPython:main Feb 6, 2026
13 checks passed
@fanninpm fanninpm deleted the dependabot-groups branch February 7, 2026 02:40
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.

2 participants