-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
introduce cargo-nightly #29319
introduce cargo-nightly #29319
Conversation
d2f3b97
to
150c670
Compare
Why not place cargo-nightly under |
The only reason why it is in the root is to make it easier for users to find it (so it is next to |
exactly for this reason I think it should be moved to scripts/ because cargo-nightly is not meant to be used by end users but by other scripts and CI only, isn't this correct? Users should use the standard cargo installed by rustup. |
During local development, we have to use the right version of nightly when formatting and clippy-ing, so I'd prefer to keep this at the top-level. On the flip-side, I appreciate that there isn't a huge difference between running:
and
Looking at this from another angle -- how do you use the right version of nightly when you're developing? Maybe I'm doing something silly. |
Does anybody recall why we use nightly for The initial use of nightly was just a crutch for, umm, some benches I think? Ideally only rely on stable so further promotion of nightly doesn't feel so good IMO |
for nightly fmt PR, https://www.github.com/solana-labs/solana/pull/23244 |
@mvines I think it was to make sure that the
|
Ah, that sounds familiar. That feature is not stablized yet though? |
Doesn't seem like it unfortunately:
|
barf, ok |
There are a number of calls to scripts/cargo-for-all-lock-files.sh nightly ... Do they also need to be changed to be routed though As |
#!/usr/bin/env bash | ||
|
||
# shellcheck source=ci/rust-version.sh | ||
here=$(dirname "$0") |
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 is a well known(?) pattern used for this:
here=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
From here: https://stackoverflow.com/a/246128/1989046
7.7k upvotes.
I can see that in other scripts the same here=$(dirname "$0")
is used.
So, it is probably out of scope for this PR.
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.
might be a good idea to make a separate PR for this: I saw more than one way of doing this in the scripts (ci, scripts folders)
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.
here=$(dirname "$0")
is pretty common and it works fine except for cases when a script is expected to be source
d , in which case BASH_SOURCE
is certainly needed.
|
@joncinque @mvines @dmakarov @ilya-bobyr @yihau have we reached consensus about these changes? If yes, please approve, these changes are prerequisite for follow up PRs |
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 it's a good change since I often do ./cargo nightly ...
in my dev workflow, but please get approval from someone else before merging since I'm just one datapoint that spends less time in this repo.
#!/usr/bin/env bash | ||
|
||
# shellcheck source=ci/rust-version.sh | ||
here=$(dirname "$0") |
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.
here=$(dirname "$0") | |
here="$(dirname "$0")" |
@@ -0,0 +1,8 @@ | |||
#!/usr/bin/env bash | |||
|
|||
# shellcheck source=ci/rust-version.sh |
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.
Please put this shellcheck directive directly above source "${here}"/ci/rust-version.sh nightly
We do have |
I also use it all the time for:
|
kk, introducing a |
Sorry if this is continuing the bike shedding, but why not keep I would imagine, |
Problem
Spin off PR for #27018
Summary of Changes
./cargo-nightly
./cargo nightly
with./cargo-nightly