-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feat(manager/rust-toolchain): Add support for rust toolchain versioning #32432
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Rhys Arkins <[email protected]>
Co-authored-by: Rhys Arkins <[email protected]>
Hey @rarkins , thanks for bearing with me as I figured things out. I appreciate it. I think things are in a good place now. Do you mind triggering the workflows once more and giving things a look? Is there a good way to try this out locally before merging, beyond unit tests? I'm betting on the renovate CLI |
If you mean test out your own (new) functionality then you can run |
describe('modules/manager/rust-toolchain/extract', () => { | ||
describe('extractPackageFile()', () => { | ||
it('returns result when fully qualified version is set', () => { | ||
const res = extractPackageFile(` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use codeBlock
template helper for proper indention
|
||
export function extractPackageFile(content: string): PackageFileContent { | ||
const deps: PackageDependency[] = []; | ||
for (const match of regexMatchAll(channelRegex, content)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
theres only one occurrence, so need of match all
I would prefer to use our toml parser and zod schema validation. so we don't have false deps when they extend the format
Changes
This PR adds a new manager that manages Rust toolchain versions in
rust-toolchain.toml
files based on releases in the rust-lang/rust github repository. The relevant Rust docs are here: https://rust-lang.github.io/rustup/overrides.htmlContext
Renovate supports updating Cargo crates but not the Rust toolchain itself. This has been discussed here, for example: #24762.
Rust allows for the toolchain version (e.g. 1.82.0) to be specified as an override in the
channel
key in arust-toolchain.toml
file (docs). The version may be specified either as a fully qualified version (e.g. 1.82.0) a major.minor version (e.g. 1.82) or as a named release (e.g. beta, nightly, stable, nightly-2014-11-15). This PR ignores named releases.https://github.com/rust-lang/rust releases are the datasource.
Documentation (please check one with an [x])
How I've tested my work (please select one)
I have verified these changes via: