Skip to content

Guidance for dealing with outdated compiler on docs.rs #2692

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

Closed
lucidBrot opened this issue Dec 16, 2024 · 3 comments
Closed

Guidance for dealing with outdated compiler on docs.rs #2692

lucidBrot opened this issue Dec 16, 2024 · 3 comments

Comments

@lucidBrot
Copy link

lucidBrot commented Dec 16, 2024

Crate name

hexgridspiral

Build failure link

https://docs.rs/crate/hexgridspiral/0.1.1/builds/1587016

Additional details

First of all, this is my first crate ever and I am using latest nightly rust (1.85) so me calling the compiler "outdated" is quite an overstatement.

Goal:
My crate makes use of some features that only work in nightly rust. Luckily, docs.rs is running a nightly version of the compiler. So in theory I can even make it build my docs with the feature flag that enables the nightly code, and then the docs would even show all functions, and annotate some as "nightly only".

Problem:

  • Docs.rs is using rustc 1.84.0-nightly
  • Locally I build with rustc 1.85.0-nightly (0aeaa5eb2 2024-12-14)
  • There is a difference in a nightly feature, meaning the code will only compile with the newer or the older version
  • Explicitly stating the minimum version of rustc does not help: https://docs.rs/crate/hexgridspiral/0.1.2/builds/1587019

Question:
What is the intended way to deal with this?

I would be surprised if I am the only one who uses nightly features. And they are bound to sometimes become unavailable or change language syntax, right?

I was thinking of adding conditional compilation to use a separate version of the code that works only with the old version of rust, just for building the docs, but then I would have to lie in the rust-version field (or remove it).

But i can also not really ask you to please upgrade the compiler version. Because then all crates that use the older version of that nightly feature would fail...

The code in question is here - the signature of steps_between is in 1.85 a tuple but in 1.84 it was just a single Option<usize>.

@syphar
Copy link
Member

syphar commented Dec 16, 2024

Typically docs.rs runs with the latest nightly version, we only freeze the version if there is a problem/bug in nightly, until it's fixed.

Right now we're frozen to nightly-2024-11-20 due to #2679. The fix is in progress, hope it will be resolved soon.

( right now I'm trying to judge if the existing bug is a bigger issue, or the frozen nightly version for some crate authors)

I would be surprised if I am the only one who uses nightly features.

You're not the only one using nightly features, see #2691 and and #2689 as recent examples.

And they are bound to sometimes become unavailable or change language syntax, right?

Yep.

@syphar
Copy link
Member

syphar commented Dec 16, 2024

seeing all the reports that need a newer nightly I decided to unfreeze the version.

I also queued rebuilds for the release above

@syphar syphar closed this as completed Dec 16, 2024
@lucidBrot
Copy link
Author

Ah I see, so I just had bad timing. Thank you very much for the patient explanation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants