-
Notifications
You must be signed in to change notification settings - Fork 315
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
adds rustfmt instructions to supported dev env #6570
Conversation
Signed-off-by: Nell Shamrell <[email protected]>
Hello nellshamrell! Thanks for the pull request! Here is what will happen next:
Thank you for contributing! |
…ustfmt Signed-off-by: Nell Shamrell <[email protected]>
@chefsalim and @baumanj - thanks for the feedback. I have combined your suggestions and updated the doc! |
``` | ||
rustup toolchain install nightly nightly-2019-03-04 | ||
rustup component add rustfmt --toolchain nightly-2019-03-04 rustfmt | ||
``` |
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.
I think @baumanj's suggestion (#6570 (comment)) was, rather than hard-code a specific nightly version in this example, directly source the contents of the file that we keep updated with the latest nightly version that works.
That way, you can just run that command, and it will get the version we're currently using.
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.
☝️
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.
Yeah, I think we should suggest people to just run
cargo +"$(< RUSTFMT_VERSION)" fmt
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.
Won't that only work at the root level of the Habitat project, though? I tried it from within a component directory and it did not work.
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.
This is a command you'd want to run from the root. If run from a component directory, I think the
bash: RUSTFMT_VERSION: No such file or directory
error should be sufficient to let users know what's gone wrong.
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.
I'd much rather err on the side of clarity and be explicit.
Signed-off-by: Nell Shamrell <[email protected]>
Just updated this based on suggestions! |
Signed-off-by: Nell Shamrell <[email protected]>
Obvious fix; these changes are the result of automation not creative thinking.
Signed-off-by: Nell Shamrell [email protected]