Skip to content

Initial rust_toolchain updater #12492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JamieMagee
Copy link
Contributor

@JamieMagee JamieMagee commented Jun 20, 2025

What are you trying to accomplish?

Add support for updating rust toolchain versions1.

Supports both rust-toolchain.toml and rust-toolchain.

Currently supported toolchain specifications:

  • Version (1.88.0, 1.88)
  • Date-based (nightly-2025-06-20, beta-2025-05-12, stable-2025-05-15)

Currently unsupported toolchain specifications:

  • Prerelease (1.88.0-beta.5)
  • Target-specific (1.88.0-x86_64-unknown-linux-gnu)

See JamieMagee/dependabot-rust-toolchain for examples.

Anything you want to highlight for special attention from reviewers?

Related:

How will you know you've accomplished your goal?

Checklist

  • I have run the complete test suite to ensure all tests and linters pass.
  • I have thoroughly tested my code changes to ensure they work as expected, including adding additional tests for new functionality.
  • I have written clear and descriptive commit messages.
  • I have provided a detailed description of the changes in the pull request, including the problem it addresses, how it fixes the problem, and any relevant details about the implementation.
  • I have ensured that the code is well-documented and easy to understand.

Footnotes

  1. https://rust-lang.github.io/rustup/concepts/toolchains.html

@JamieMagee JamieMagee requested a review from a team as a code owner June 20, 2025 22:29
@JamieMagee JamieMagee force-pushed the jamiemagee/rust-toolchain-updater branch from 2c6e7e5 to e7dc6ed Compare June 20, 2025 22:34
@JamieMagee JamieMagee force-pushed the jamiemagee/rust-toolchain-updater branch 4 times, most recently from 5dab76e to 3a6409a Compare June 23, 2025 16:24
requirement_string = obj.to_s.strip

# Parse requirement strings with operators (e.g., ">= 1.72.0")
match = requirement_string.match(/^(>=|>|<=|<|=)\s?(.+)$/)
Copy link
Contributor

Choose a reason for hiding this comment

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

In other ecosystems I've seen 'bump' syntax operator ~> that essentially allows only the last listed number to change. E>g., ~>1.72.0 would allow an update to 1.72.5 but not to 1.73.0. Similarly, ~>1.72 would allow an update to 1.75 but not to 2.0.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In what cases though? rust-toolchain.toml expects an exact version, not a range. I only implemented this to support ignore-conditions in Dependabot configuration.

@JamieMagee JamieMagee requested a review from brettfo June 25, 2025 05:10
@JamieMagee JamieMagee force-pushed the jamiemagee/rust-toolchain-updater branch from b7d4e15 to b4204ff Compare June 25, 2025 06:54
@JamieMagee JamieMagee added the T: new-ecosystem Requests for new ecosystems/languages label Jun 25, 2025
@JamieMagee JamieMagee moved this to In review in Dependabot Jun 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: new-ecosystem Requests for new ecosystems/languages
Projects
Status: In review
Development

Successfully merging this pull request may close these issues.

2 participants