Skip to content

Bump time version from 0.3.6 to 0.3.44 to bump deranged version from 0.4.0 to 0.5.x#382

Closed
iamjpotts wants to merge 1 commit into
rustls:mainfrom
iamjpotts:jp/doc-auto-cfg-removed
Closed

Bump time version from 0.3.6 to 0.3.44 to bump deranged version from 0.4.0 to 0.5.x#382
iamjpotts wants to merge 1 commit into
rustls:mainfrom
iamjpotts:jp/doc-auto-cfg-removed

Conversation

@iamjpotts
Copy link
Copy Markdown
Contributor

@iamjpotts iamjpotts commented Sep 28, 2025

Resolves new ci failure unrelated to a code change:

 Documenting deranged v0.4.0
error[E0557]: feature has been removed
 --> /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/deranged-0.4.0/src/lib.rs:3:29
  |
3 | #![cfg_attr(docsrs, feature(doc_auto_cfg))]
  |                             ^^^^^^^^^^^^ feature has been removed
  |
  = note: removed in 1.58.0; see <https://github.com/rust-lang/rust/pull/138907> for more information
  = note: merged into `doc_cfg`

error: Compilation failed, aborting rustdoc

For more information about this error, try `rustc --explain E0557`.
error: could not document `deranged`
warning: build failed, waiting for other jobs to finish...
Error: Process completed with exit code 101.

…0.4.0 to 0.5.x

Signed-off-by: Joshua Potts <8704475+iamjpotts@users.noreply.github.com>
@djc
Copy link
Copy Markdown
Member

djc commented Sep 28, 2025

I don't think we need to bump the requirement for this, only the lockfile.

@iamjpotts
Copy link
Copy Markdown
Contributor Author

It still failed the same way after the bump. I'm digging into it more. I have an unconfirmed suspicion that a change to nightly caused this.

@iamjpotts
Copy link
Copy Markdown
Contributor Author

This command:

RUSTDOCFLAGS='-Dwarnings --cfg=docsrs' cargo doc --features ring,pem,x509-parser --document-private-items

Succeeds with nightly-2025-09-27 (reported in eastern time as 9-26) but fails with nightly-2025-09-28 (reported by rustc in eastern time as 9-27, and current nightly as of right now).

@iamjpotts
Copy link
Copy Markdown
Contributor Author

iamjpotts commented Sep 28, 2025

Related:

ratatui/ratatui#2102
rust-lang/rust#43781

PR linked in error text:

rust-lang/rust#138907

I am able to reproduce the error by cloning the https://github.com/jhpratt/deranged crate and running rustup update nightly-2025-09-28 && RUSTDOCFLAGS='-Dwarnings --cfg=docsrs' cargo doc --document-private-items on that clone, so whatever problem there is is in that crate.

@iamjpotts
Copy link
Copy Markdown
Contributor Author

I opened a pr on the dependency crate: jhpratt/deranged#24

Bumping the time crate requires an MSRV bump to rcgen - I assume this would be a breaking change version wise (0.14.x -> 0.15.x). Stable 7 months ago is 1.85.0.

In the meantime before a fix to deranged how do you feel about a PR that pins the version of nightly to the last version before this break?

@djc
Copy link
Copy Markdown
Member

djc commented Sep 28, 2025

In the meantime before a fix to deranged how do you feel about a PR that pins the version of nightly to the last version before this break?

Sounds good, thank you for looking into this!

@ctz
Copy link
Copy Markdown
Member

ctz commented Sep 28, 2025

Is it even possible to pin the version of nightly that docs.rs uses?

@djc
Copy link
Copy Markdown
Member

djc commented Sep 28, 2025

Bumping the time crate requires an MSRV bump to rcgen - I assume this would be a breaking change version wise (0.14.x -> 0.15.x). Stable 7 months ago is 1.85.0.

FYI MSRV bumps are usually not treated as semver-breaking in the ecosystem. But, I don't think we need to do an MSRV bump here -- we can just stick to an older time/deranged in our lockfile for now.

@iamjpotts
Copy link
Copy Markdown
Contributor Author

Is it even possible to pin the version of nightly that docs.rs uses?

It can be pinned in the github workflow file.

@djc
Copy link
Copy Markdown
Member

djc commented Sep 28, 2025

Is it even possible to pin the version of nightly that docs.rs uses?

But I understood the proposed fix to be about pinning it in our CI so the docs workflow can do its thing.

@iamjpotts
Copy link
Copy Markdown
Contributor Author

Is it even possible to pin the version of nightly that docs.rs uses?

But I understood the proposed fix to be about pinning it in our CI so the docs workflow can do its thing.

#383

@ctz
Copy link
Copy Markdown
Member

ctz commented Sep 28, 2025

Is it even possible to pin the version of nightly that docs.rs uses?

But I understood the proposed fix to be about pinning it in our CI so the docs workflow can do its thing.

But isn't the docs workflow's purpose to demonstrate that the docs.rs build will work once the crate is published?

@ctz
Copy link
Copy Markdown
Member

ctz commented Sep 28, 2025

I think the right thing to do here is rename --cfg=docsrs to --cfg=rcgen-docsrs which will stop triggering unwanted docs.rs-specific behaviours in downstream crates.

Also worth noting that there is a missing rustdoc-args key in the [package.metadata.docs.rs] so I suspect this line https://github.com/rustls/rcgen/blob/main/rcgen/src/lib.rs#L32 is not activated by docs.rs (and also nothing enables all features either).

@djc
Copy link
Copy Markdown
Member

djc commented Sep 29, 2025

I think the right thing to do here is rename --cfg=docsrs to --cfg=rcgen-docsrs which will stop triggering unwanted docs.rs-specific behaviours in downstream crates.

Ah yeah, that's fair.

@iamjpotts
Copy link
Copy Markdown
Contributor Author

CI failure that prompted this PR was resolved by #384.

@iamjpotts iamjpotts closed this Oct 1, 2025
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

Successfully merging this pull request may close these issues.

3 participants