-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
📌 Pin Clippy to a nightly 📌 #6401
Conversation
(converting to draft as I want to test the changes manually in the rustc repo) |
Can we specify a commit up to that we sync when pulling from |
I like @matthiaskrgr idea. So the process of a Rustup would be to check the commit of the latest nightly, then checkout this commit in the Rust repo and do the sync from the detached head. We can build tooling for this later. There is also
Yeah, we should do it together with (right after) the rustups. Rustup PRs should get
I don't mind doing them, it's really not that much work. I'll post on Zulip if I should not get to do them for some reason.
I don't think so? 🤔 We'll see, I guess |
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'll have to do in depth review and think about this for a bit longer, so that we don't forget about something. Thanks for moving this forward ❤️
Right now, the
This might be something to be aware of, I hope it won't break our neck later at some point.... It also installs clippy from that nightly for some reason which seems a bit excessive? 😄 |
If I'm not mistaken the situation should not be different to what we have now as we are using
Yeah, that was an oversight when adding TOML support for the toolchain file, it installs the components in the current profile in addition to the ones specified. There's rust-lang/rustup#2579 to address it. In the CI we set the minimal profile before starting the build, so it does not try to install clippy. |
After testing this in the in-tree version of Clippy, I think it does not cause additional problems. I ran into the I've opened a Zulip thread to discuss that problem, but I think it was already present. |
I am a bit iffy about this: we used to pin to nightlies and dealing with the gap period between master merges and nightlies was really annoying. But now that rustups can happen without us needing to fix things, perhaps this just means we need to run syncs at appropriate times. That seems fine. |
Yeah, now it should just be I'll try to review this over the weekend 👍 |
This comment has been minimized.
This comment has been minimized.
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.
LGTM, let's do this with #6401 (comment) addressed 🚀
Also the sync should be in the order
subtree push
to the Clippy reposubtree pull
to the Rust repo
That way we make sure, that both Clippy and Rust pass the complete Clippy test suite after each sync.
Also somewhere should be documented, that you want to sync from Rust to Clippy from the latest nightly commit (rustup check
), not the top-of-tree commit.
ba68518
to
82a4206
Compare
I've addressed the last remark and updated to the latest nightly to be coherent with the latest rustup we did yesterday. |
82a4206
to
945536b
Compare
@bors r+ Let's go, thanks for moving this forward! 🚀 Next steps:
|
📌 Commit 945536b has been approved by |
📌 Pin Clippy to a nightly 📌 changelog: none Addresses partially #5561. As proposed there in [this comment](#5561 (comment)), this kicks off the process, to help us get acquainted with how the syncs should work, before working on improving the tooling. Open questions: * When performing a rustup, we will need to exclude the commits that were merged that same day, or else wait until that nightly is released. I did not update the documentation about this part, mainly because I'm not sure about how to do that. * When should we perform the rustups now? My first idea is to do it at the same time we do the clippyups, to have a clear cadence and to avoid the two copies of the repo to diverge enough to make the process painful. * Who does the rustups now? If we follow my previous idea and do both rustup and clippyup at the same time, it would be more work for `@flip1995` who currently does the clippyups. I would prefer to establish some kind of rotation to spead the work. Other ideas? * I'm not sure if this affects the release process in any way. * ??? `@rust-lang/clippy` thoughts? r? `@flip1995`
💔 Test failed - checks-action_test |
Off to a good start 😄 I don't think we need the steps, which set the |
This patch should do the job: diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml
index 181b3bab4..7a9a2893c 100644
--- a/.github/workflows/clippy.yml
+++ b/.github/workflows/clippy.yml
@@ -38,7 +38,6 @@ jobs:
- name: rust-toolchain
uses: actions-rs/toolchain@v1.0.6
with:
- toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal
@@ -56,12 +55,6 @@ jobs:
restore-keys: |
${{ runner.os }}-x86_64-unknown-linux-gnu
- # Run
- - name: Set LD_LIBRARY_PATH (Linux)
- run: |
- SYSROOT=$(rustc --print sysroot)
- echo "LD_LIBRARY_PATH=${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" >> $GITHUB_ENV
-
- name: Build
run: cargo build --features deny-warnings
diff --git a/.github/workflows/clippy_bors.yml b/.github/workflows/clippy_bors.yml
index f08182365..06fb314d1 100644
--- a/.github/workflows/clippy_bors.yml
+++ b/.github/workflows/clippy_bors.yml
@@ -87,7 +87,6 @@ jobs:
- name: rust-toolchain
uses: actions-rs/toolchain@v1.0.6
with:
- toolchain: nightly
target: ${{ matrix.host }}
profile: minimal
@@ -106,23 +105,6 @@ jobs:
${{ runner.os }}-${{ matrix.host }}
# Run
- - name: Set LD_LIBRARY_PATH (Linux)
- if: runner.os == 'Linux'
- run: |
- SYSROOT=$(rustc --print sysroot)
- echo "LD_LIBRARY_PATH=${SYSROOT}/lib${LD_LIBRARY_PATH+:${LD_LIBRARY_PATH}}" >> $GITHUB_ENV
- - name: Link rustc dylib (MacOS)
- if: runner.os == 'macOS'
- run: |
- SYSROOT=$(rustc --print sysroot)
- sudo mkdir -p /usr/local/lib
- sudo find "${SYSROOT}/lib" -maxdepth 1 -name '*dylib' -exec ln -s {} /usr/local/lib \;
- - name: Set PATH (Windows)
- if: runner.os == 'Windows'
- run: |
- SYSROOT=$(rustc --print sysroot)
- echo "$SYSROOT/bin" >> $GITHUB_PATH
-
- name: Build with internal lints
run: cargo build --features deny-warnings,internal-lints
@@ -169,7 +151,6 @@ jobs:
- name: rust-toolchain
uses: actions-rs/toolchain@v1.0.6
with:
- toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal
@@ -247,7 +228,6 @@ jobs:
- name: rust-toolchain
uses: actions-rs/toolchain@v1.0.6
with:
- toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal
diff --git a/.github/workflows/clippy_dev.yml b/.github/workflows/clippy_dev.yml
index 5ee157cf2..8ca6a8c0c 100644
--- a/.github/workflows/clippy_dev.yml
+++ b/.github/workflows/clippy_dev.yml
@@ -25,10 +25,8 @@ jobs:
- name: rust-toolchain
uses: actions-rs/toolchain@v1.0.6
with:
- toolchain: nightly
target: x86_64-unknown-linux-gnu
profile: minimal
- components: rustfmt
- name: Checkout
uses: actions/checkout@v2.3.3 |
^We also have to remove the |
Hmm don't we need EDIT: I thought we wanted to keep that behavior in case |
@bors try |
📌 Pin Clippy to a nightly 📌 changelog: none Addresses partially #5561. As proposed there in [this comment](#5561 (comment)), this kicks off the process, to help us get acquainted with how the syncs should work, before working on improving the tooling. Open questions: * When performing a rustup, we will need to exclude the commits that were merged that same day, or else wait until that nightly is released. I did not update the documentation about this part, mainly because I'm not sure about how to do that. * When should we perform the rustups now? My first idea is to do it at the same time we do the clippyups, to have a clear cadence and to avoid the two copies of the repo to diverge enough to make the process painful. * Who does the rustups now? If we follow my previous idea and do both rustup and clippyup at the same time, it would be more work for `@flip1995` who currently does the clippyups. I would prefer to establish some kind of rotation to spead the work. Other ideas? * I'm not sure if this affects the release process in any way. * ??? `@rust-lang/clippy` thoughts? r? `@flip1995`
@bors try Let's try to enable all of our integration tests again |
📌 Pin Clippy to a nightly 📌 changelog: Pin Clippy to a specific nightly version (No more master/custom toolchain required to compile Clippy) Addresses partially #5561. As proposed there in [this comment](#5561 (comment)), this kicks off the process, to help us get acquainted with how the syncs should work, before working on improving the tooling. Open questions: * When performing a rustup, we will need to exclude the commits that were merged that same day, or else wait until that nightly is released. I did not update the documentation about this part, mainly because I'm not sure about how to do that. * When should we perform the rustups now? My first idea is to do it at the same time we do the clippyups, to have a clear cadence and to avoid the two copies of the repo to diverge enough to make the process painful. * Who does the rustups now? If we follow my previous idea and do both rustup and clippyup at the same time, it would be more work for `@flip1995` who currently does the clippyups. I would prefer to establish some kind of rotation to spead the work. Other ideas? * I'm not sure if this affects the release process in any way. * ??? `@rust-lang/clippy` thoughts? r? `@flip1995`
Uhm some changes in this PR make our integration test silently fail/not run at all. I'll investigate. |
☀️ Try build successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
The only thing we now cache is cargo-cache, which we only use for cache. That's a catch-22 if I ever seen one. And for Clippy itself we always want to do a clean build and not cache anything.
279721c
to
d3b0a65
Compare
@bors try |
📌 Pin Clippy to a nightly 📌 changelog: Pin Clippy to a specific nightly version (No more master/custom toolchain required to compile Clippy) Addresses partially #5561. As proposed there in [this comment](#5561 (comment)), this kicks off the process, to help us get acquainted with how the syncs should work, before working on improving the tooling. Open questions: * When performing a rustup, we will need to exclude the commits that were merged that same day, or else wait until that nightly is released. I did not update the documentation about this part, mainly because I'm not sure about how to do that. * When should we perform the rustups now? My first idea is to do it at the same time we do the clippyups, to have a clear cadence and to avoid the two copies of the repo to diverge enough to make the process painful. * Who does the rustups now? If we follow my previous idea and do both rustup and clippyup at the same time, it would be more work for `@flip1995` who currently does the clippyups. I would prefer to establish some kind of rotation to spead the work. Other ideas? * I'm not sure if this affects the release process in any way. * ??? `@rust-lang/clippy` thoughts? r? `@flip1995`
💔 Test failed - checks-action_test |
d3b0a65
to
836325e
Compare
@bors try (please work) |
📌 Pin Clippy to a nightly 📌 changelog: Pin Clippy to a specific nightly version (No more master/custom toolchain required to compile Clippy) Addresses partially #5561. As proposed there in [this comment](#5561 (comment)), this kicks off the process, to help us get acquainted with how the syncs should work, before working on improving the tooling. Open questions: * When performing a rustup, we will need to exclude the commits that were merged that same day, or else wait until that nightly is released. I did not update the documentation about this part, mainly because I'm not sure about how to do that. * When should we perform the rustups now? My first idea is to do it at the same time we do the clippyups, to have a clear cadence and to avoid the two copies of the repo to diverge enough to make the process painful. * Who does the rustups now? If we follow my previous idea and do both rustup and clippyup at the same time, it would be more work for `@flip1995` who currently does the clippyups. I would prefer to establish some kind of rotation to spead the work. Other ideas? * I'm not sure if this affects the release process in any way. * ??? `@rust-lang/clippy` thoughts? r? `@flip1995`
☀️ Try build successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
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.
LGTM in general (github won't let me auto-approve the PR 😄)
I just left a doubt.
- name: Run cargo update | ||
run: cargo update | ||
- name: Install toolchain | ||
run: rustup show active-toolchain |
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.
If we remove the rust-toolchain
step, from where does the rustup
used in this command come from?
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.
GHA ships with stable rust+rustup already installed. See GHA documentation about the pre-installed software
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.
That's convenient :)
BTW thanks for the work on this, you saved me another night fighting the CI 😄
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.
NP, I like CI pain 😄
So can we merge this? :)
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.
Sure! I was hesitant about approving a PR I opened 😄
@bors r+ |
📌 Commit 836325e has been approved by |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
changelog: Pin Clippy to a specific nightly version (No more master/custom toolchain required to compile Clippy)
Addresses partially #5561. As proposed there in this comment, this kicks off the process, to help us get acquainted with how the syncs should work, before working on improving the tooling.
Open questions:
@rust-lang/clippy thoughts?
r? @flip1995