Skip to content

rustdoc query cycle regression #141492

@BoxyUwU

Description

@BoxyUwU
Member
          I believe this caused a regression on nightly. See https://github.com/aya-rs/aya/actions/runs/15223453504/job/42822502727.
 Documenting aya-log-ebpf v0.1.1 (/home/runner/work/aya/aya/ebpf/aya-log-ebpf)
error[E0391]: cycle detected when computing revealed normalized predicates of `aya_ebpf::EbpfContext::command::{constant#0}`
  --> /home/runner/work/aya/aya/ebpf/aya-ebpf/src/lib.rs:42:38
   |
42 |     fn command(&self) -> Result<[u8; TASK_COMM_LEN], c_long> {
   |                                      ^^^^^^^^^^^^^
   |
note: ...which requires computing normalized predicates of `aya_ebpf::EbpfContext::command::{constant#0}`...
  --> /home/runner/work/aya/aya/ebpf/aya-ebpf/src/lib.rs:42:38
   |
42 |     fn command(&self) -> Result<[u8; TASK_COMM_LEN], c_long> {
   |                                      ^^^^^^^^^^^^^
   = note: ...which again requires computing revealed normalized predicates of `aya_ebpf::EbpfContext::command::{constant#0}`, completing the cycle
   = note: cycle used when normalizing `aya_ebpf::::EbpfContext::command::{constant#0}`
   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information

For more information about this error, try `rustc --explain E0391`.
error: could not document `aya-log-ebpf`

Oddly, this seems specific to rustdoc.

Originally posted by @tamird in #139635 (comment)

Activity

added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on May 24, 2025
added
T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
C-bugCategory: This is a bug.
and removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on May 24, 2025
added
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on May 24, 2025
BoxyUwU

BoxyUwU commented on May 24, 2025

@BoxyUwU
MemberAuthor

I'm not sure how #139635 would have caused this, it doesn't touch anything to do with what queries get called so shouldn't be introducing new query cycles. @tamird what makes you think that's the PR that regressed your crate?

tamird

tamird commented on May 24, 2025

@tamird
Contributor

The tests updated in that PR contain the same diagnostic text e.g. b1774b8#diff-d26852ce626e7632e48fd9e08630bf948f008ef8f7de7b00336c6b9cb0eda19f

tamird

tamird commented on May 24, 2025

@tamird
Contributor

Ah, I posted this on the wrong PR, it was probably #140553.

added
I-cycleIssue: A query cycle occurred while none was expected
on May 24, 2025
BoxyUwU

BoxyUwU commented on May 24, 2025

@BoxyUwU
MemberAuthor

Ah I see what you mean. I'll take a look and see what happened there and verify if it was that PR that caused it.

BoxyUwU

BoxyUwU commented on May 24, 2025

@BoxyUwU
MemberAuthor

@tamird I can't seem to reproduce the failure locally, though I did notice that the crate sometimes uses generic_const_exprs. Is the CI failure happening in a place where the unstable cfg is set and so generic_const_exprs is enabled?

BoxyUwU

BoxyUwU commented on May 24, 2025

@BoxyUwU
MemberAuthor

Ah running cargo xtask public-api --bless reproduces it and stops when removing the enabling of generic_const_exprs. So I think this is a gce only regression, and also seems reasonable to expect that #140553 was the cause

removed
I-prioritizeIssue: Indicates that prioritization has been requested for this issue.
on May 24, 2025

14 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-const-genericsArea: const generics (parameters and arguments)C-bugCategory: This is a bug.F-generic_const_exprs`#![feature(generic_const_exprs)]`I-cycleIssue: A query cycle occurred while none was expectedT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @robert3005@nazar-pc@tamird@fmease@BoxyUwU

        Issue actions

          rustdoc query cycle regression · Issue #141492 · rust-lang/rust