-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Publish a new release #5270
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
Comments
Hi, clippy is no longer published to crates.io. Nowadays clippy is distributed by |
What I meant was that the latest clippy shipped with cargo had been released few months ago:
But the most recent
Everything's up to date as far as I can tell:
|
The Clippy version was not updated in the point release of rust 1.41.1, so it is still the 69f99e7 commit, as it was in rust 1.41.0. Clippy has a 1.41.1 release: https://github.com/rust-lang/rust-clippy/releases/tag/rust-1.41.1 If you want a more recent Clippy, you can use the nightly or beta toolchain. |
Can someone link me to the issue where it was decided to not ship to crates.io anymore? I used to be able to build from source using |
You can still install Clippy from source. For this see our documentation. There's not a real issue about this. Since Clippy got distributed via rustup, publishing it on crates.io doesn't make sense for us. The PR where we stopped publishing is #3247 |
Sure, but before it was easy, now I'm going to have to do a multistep process because having two ways to install it was a boy odd? There's probably more to it than that but it's annoying when something that used to work stops working without a clear reason for the lack of support |
It also looks like the rust-clippy build script only works with the nightly compiler, can you confirm this? |
Yes, but you were never able to build "any" version of clippy with "any" version of the compiler I think. The nighty version that the repo is guaranteed to build with is set via the |
I've checked out rust-clippy's stable tag, removed the nightly only flags (as I don't have a nightly compiler), and now I'm directed to use rustup for get additional sources. Please don't understand me as saying it's wrong to tie clippy to rustup. I'm not, it might make sense for the project and most users. Still, I'd just like to know what benefit clippy gets from changing how it ships |
Clippy is kind of tied to the compiler. Cippy asks the compiler for its representation of the code, runs some lints, returns the results back to the compiler and then rustc prints the lint warnings that we all love. So clippy directly uses a bunch of rustcs compiler internal APIs/functions/data structures etc. At some point we got fed up and added a copy of clippy to the rustc source tree, so now when someone changes rustc code, they can fix the incompatibility with clippy at the same time, so that the rustc api and the in-source clippy stay in sync and clippy compiles stably all the time. Every couple of weeks, the api compatibility fixes that went into the clippy-rustc are merged into this github repo and the new lints or fixes that were made to clippy in this repo are synced back into the rustc repo. Inside this repo, after each sync from the rustc we pin the nightly to the rustc nightly that we synced from (with the rust-toolchain file) to make sure contributors can build and test clippy. I hope this gives some rough overview, please correct me if I am wrong 🙂 |
So IIUC you only have a stable If you're building for a target that doesn't have the |
Thank you! That explains it and is really helpful to understand.
You're right, I have a stable rustc and cargo which are patched by the
Termux maintainers to run on 'aarch64-linux-android', but there's no
patched rustup at the moment. It seems like a big job to get rustup to
support a new arch, and though the generic aarch64 might work, I haven't
been able to get rustup to try to use it.
Thanks for your help so far.
…On Wed, 22 Dec 2021, 2:20 am Philipp Krones, ***@***.***> wrote:
So IIUC you only have a stable rustc and no rustup? I assume you have
access to cargo? On what target are you trying to build Clippy? With that
information I may be able to give you a better suggestion on how to move
forward.
—
Reply to this email directly, view it on GitHub
<#5270 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIRUHQTNFMFUAHCLDMV4KTUSCLM7ANCNFSM4LCE6O5Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thanks for the information! This might take a while though. You may want to try to cross-compile Clippy. Out of interest I tried to do this and those are the steps that I came up with:
Note: It would also not help you, if Clippy would still be available on crates.io. The blocker is, that you don't have access to the |
Yes, I understand the tier situation.
Thanks for exploring the steps but I hope it's clear how distributing
things through anything other than cargo seems significantly worse for
users who aren't always on fully supported platforms.
I mean, that's kinda what being unsupported is, so it's a cost benefit
analysis thing. Totally understand if it's too costly to do, just galling
for me that it used to work so nicely and now it seems out of reach.
I think, at this point, it'd be more practical for me to remote in to a
server and work there, or just give up on the fun of being able to work on
anything but a laptop.
Thanks for the help though. Hope it hasn't been a drag to walk me through
it all.
…On Wed, 22 Dec 2021, 11:23 pm Philipp Krones, ***@***.***> wrote:
Thanks for the information! aarch64-linux-android is a Tier 2 platform
without host tools
<https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-2>,
which means, that the rust project currently doesn't ship any tools and
with that also doesn't ship rustc-dev, which is required to compile
Clippy. So the only way to natively compile Clippy for
aarch64-linux-android is to compile rustc itself and with that Clippy.
You can do this in rust-lang/rust with ./x.py build src/tools/clippy.
This might take a while though. You may want to try to cross-compile
Clippy. Out of interest I tried to do this and those are the steps that I
came up with:
1. Have access to a machine which has at least Tier 2 with host tools
support and where the Android NDK is available
2. Download the Android NDK:
https://developer.android.com/ndk/downloads
a. export
PATH=/path/to/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH
3. Install the aarch64-linux-android target with rustup target add
aarch64-linux-android
4. In the Clippy repo, run: cargo dev setup intellij
--repo-path=/path/to/rust and move the added dependencies from
cfg(NOT_A_PLATFORM) to normal deps.
5. Add the following lines to .cargo/config.toml:
[target.aarch64-linux-android]linker = "/path/to/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang"
6. Build Clippy with RUSTC_INSTALL_BINDIR=bin
CFG_RELEASE_CHANNEL=nightly CFG_RELEASE=1.59.0 cargo build
--target=aarch64-linux-android --release (during linking it might look
for -lgcc. You can work around this error by adding a libgcc.a
textfile with the content INPUT(-lunwind) to
/path/to/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android
)
------------------------------
Note: It would also not help you, if Clippy would still be available on
crates.io. The blocker is, that you don't have access to the rustc-dev
component.
—
Reply to this email directly, view it on GitHub
<#5270 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAIRUHQIWT6BS5KH2MXJR2LUSG7MHANCNFSM4LCE6O5Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yeah, you could make the case to add host tool support to aarch64-linux-android in rust-lang/rust. Though I don't know how much work that would be. Here's the policy for adding host tool support to a Tier 2 target: https://doc.rust-lang.org/rustc/target-tier-policy.html#tier-2-with-host-tools
It would surprise me if there would be any difference if we'd publish it on crates.io. "used to work so nicely" must be years ago, where all the rustc_* crates were still shipped in rust-std: rust-lang/rust#64823.
Not at all! |
Hey guys, it looks like there wasn't a release of
clippy
in a few months already. Would it be possible to publish a new version?The text was updated successfully, but these errors were encountered: