freifunk-saar / ff-node-monitor

Monitoring for Freifunk nodes
GNU Affero General Public License v3.0
3 stars 2 forks source link

component 'rustfmt' for target 'x86_64-unknown-linux-gnu' is unavailable #75

Closed rubo77 closed 4 years ago

rubo77 commented 4 years ago

# sudo -u ff-node-monitor ~ff-node-monitor/.cargo/bin/rustup default $(cat rust-version)
info: syncing channel updates for 'nightly-2020-06-20-x86_64-unknown-linux-gnu'
info: latest update on 2020-06-20, rust version 1.46.0-nightly (2d8bd9b74 2020-06-19)
error: component 'rustfmt' for target 'x86_64-unknown-linux-gnu' is unavailable for download for channel nightly-2020-06-20
Sometimes not all components are available in any given nightly.
rubo77 commented 4 years ago

I tried this instead:

 sudo -u ff-node-monitor ~ff-node-monitor/.cargo/bin/rustup default nightly

info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu' info: latest update on 2020-07-19, rust version 1.47.0-nightly (1fa54ad96 2020-07-18) ... nightly-x86_64-unknown-linux-gnu installed - rustc 1.46.0-nightly (346aec9b0 2020-07-11)

# sudo -u ff-node-monitor ~ff-node-monitor/.cargo/bin/cargo build --release
Compiling...
Finished release [optimized] target(s) in 3m 03s

so 2020-07-19 seems to be ok

RalfJung commented 4 years ago

Is there a question here? So far you just shared some rustup logs... all looks normal to me.

If you have general Rust questions, please also consider the usual Rust community channels (all documented on the Rust website).

rubo77 commented 4 years ago

Yes, I think the current rust version doesn't build

RalfJung commented 4 years ago

It builds just fine, as our CI confirmed. Nothing in the errors you quoted indicates a build problem.

This particular Rust nightly just doesn't come with rustfmt, that's all. Just use a newer nightly, or remove rustfmt.

RalfJung commented 4 years ago

In the future, when reporting an error, please state explicitly the expected and the actual behavior that you see. In case of this bug, so far everything you described is entirely expected, as far as I am concerned. That makes it hard to even know what it is you want to achieve by posting some logs.

I now changed rust-version to a version that includes rustfmt. But note that 2020-07-19 also does not include rustfmt so I really don't know what your problem was -- probably rustup misuse. I cannot promise for the future that all nightly versions we depend on will come with rustfmt; you'll have to figure out a way to deal with that. I never had any problems with this so I am not sure what to tell you here -- I'd need step-by-step reproduction instructions to even figure out what happens. Your report does not contain nearly enough information for that.

Longer-term, Rocket will work on stable Rust and we won't need any of this "pinning a nightly Rust version" any more anyway. :)

rubo77 commented 4 years ago

So as i understand, rustfmt can be uninstalled and my error message will be gone?

I never installed anything else so rustfmt must have been installed in an older version here.

But let's close this then ;)