-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Mention quotes for toolchain #91
base: master
Are you sure you want to change the base?
Conversation
@@ -86,15 +88,15 @@ compiler support. | |||
# offset, which may be written in years, months, weeks, or days. | |||
- uses: dtolnay/rust-toolchain@master | |||
with: | |||
toolchain: stable 18 months ago | |||
toolchain: 'stable 18 months ago' |
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.
The quotes are not necessary here, but it's a good habit to use quotes in YAML. Or as someone on HN said it: "save yourself pain. Always quote" (https://news.ycombinator.com/item?id=34509789).
@@ -43,6 +43,8 @@ All inputs are optional. | |||
Rustup toolchain specifier e.g. <code>stable</code>, <code>nightly</code>, <code>1.42.0</code>, <code>nightly-2022-01-01</code>. | |||
<b>Important: the default is to match the @rev as described above.</b> | |||
When passing an explicit <code>toolchain</code> as an input instead of @rev, you'll want to use "dtolnay/rust-toolchain@master" as the revision of the action. | |||
<b>Also important: use quotes to ensure that the right toolchain version is passed to this GitHub Action.</b> | |||
For example, specify <code>toolchain: '1.70'</code> (with quotes) because <code>toolchain: 1.70</code> will be parsed as <code>toolchain: 1.7</code>. |
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.
Couldn't this be fixed instead? I assume it is only an issue if you parse through serde_yaml::Value?
fn main() {
dbg!(serde_yaml::from_str::<Foo>("v: 1.70").unwrap());
}
#[derive(serde::Deserialize, Debug)]
struct Foo {
v: String
}
[src/main.rs:2] serde_yaml::from_str::<Foo>("v: 1.70").unwrap() = Foo {
v: "1.70",
}
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.
github actions go through YAML
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.
Just want to note that this would resolve #112.
I've re-learned the importance of quotes the hard way 😅
Preview