Skip to content

Conversation

lqd
Copy link
Member

@lqd lqd commented Sep 11, 2025

Creating issues is failing right now, with a cryptic error message.

Error: error: failed to adjust issues; rerun command to resume
   --> crates/rust-project-goals-cli/src/main.rs:160:28
    |
160 |                 e.wrap_str(Spanned::here(
    |                            ^^^^^^^^^^^^^^
    |
   ::: /home/lqd/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spanned-0.6.1/src/error.rs:130:23
    |
130 |                 span: Span::here(),
    |                       ^^^^^^^^^^^^^ EOF while parsing a value at line 1 column 0
    |

The problem was that fetching the issue failed, but the code didn't check for the command status and tried to parse an empty response.

This PR fixes this error handling issue (and there may be more of this pattern elsewhere) and also improves the error to add more information about the goal causing the issue:

Error: error: failed to adjust issues; rerun command to resume
   --> crates/rust-project-goals-cli/src/main.rs:160:28
    |
160 |                 e.wrap_str(Spanned::here(
    |                            ^^^^^^^^^^^^^^
    |
   ::: crates/rust-project-goals-cli/src/rfc.rs:306:36
    |
306 |                         e.wrap_str(Spanned::here(format!(
    |                                    ^^^^^^^^^^^^^^^^^^^^^^ error while fetching declared tracking issue 891 for goal ./src/2025h2/gcc-backend-tests.md
    |
   ::: crates/rust-project-goals/src/gh/issues.rs:116:9
    |
116 |         spanned::bail_here!(
    |         ^^^^^^^^^^^^^^^^^^^^ fetching `rust-lang/rust-project-goals` issue 891 failed: GraphQL: Could not resolve to an issue or pull request with the number of 891. (repository.issue)

    |

It also adds a validation step for the Tracking issue row, to ensure they point to this repository, and suggests using another row when needed:

Error: error: tracking issues are issues in the rust-project-goals repository. The `[rust-lang/compiler-team#891]` issue can go in the `Other tracking issues` row.
   --> src/2025h2/gcc-backend-tests.md:7:22
    |
  7 | | Tracking issue   | [rust-lang/compiler-team#891]                  |
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
   ::: crates/rust-project-goals/src/goal.rs:459:13
    |
459 |             spanned::bail!(
    |             ^^^^^^^^^^^^^^^ error reported here

And finally, it fixes the "Tracking issue" problem in the 3 failing goals.

Rendered

@tomassedovic tomassedovic merged commit a13c954 into rust-lang:main Sep 11, 2025
2 checks passed
@lqd lqd deleted the issue-errors branch September 11, 2025 14:31
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.

2 participants