Skip to content

Diff on rustdoc test failure does not work on Windows #82409

Closed

Description

@rylev

When running x .py test .\src\test\rustdoc on Linux and a failure happens, a really nice diff of the output vs rustdoc-nightly is produced which very clearly shows the issue. This does not work on Windows for multiple reasons.

One the call to diff fails:

info: generating a diff against nightly rustdoc
warning: no pager configured, falling back to `diff --color`
help: try configuring a git pager (e.g. `delta`) with `git config --global core.pager delta`
thread '[rustdoc] rustdoc\sidebar-link-generation.rs' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "The system cannot find the file specified." }', src\tools\compiletest\src\runtest.rs:2467:55

Second, the output from rustdoc-nightly seems to exactly match that from the local compiler making it not possible to do manual diffs.

Activity

  1. jyn514 commented on Feb 22, 2021

    @jyn514
    Member

    One the call to diff fails:

    How do you diff directories recursively on Windows? On Linux I would be very surprised for diff not to be installed.

    The output from rustdoc-nightly seems to exactly match that from the local compiler

    Oh I just thought of something - do you have a rustup overide that defaults to your local toolchain? Right now compiletest assumes the default is nightly, I've been meaning to change it.

  2. rylev commented on Feb 22, 2021

    @rylev
    ContributorAuthor

    do you have a rustup overide that defaults to your local toolchain?

    No, I only set overrides on specific projects (and rust-lang/rust is not one of them). My default is the stable compiler.

  3. added
    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to Rust
    A-testsuiteArea: The testsuite used to check the correctness of rustc
    O-windowsOperating system: Windows
    T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
    on Feb 22, 2021
  4. mati865 commented on Feb 23, 2021

    @mati865
    Member

    Git for Windows provides diff:

    $ which diff
    /usr/bin/diff
    

    Are you building Rust using Git Bash prompt?

  5. rylev commented on Feb 23, 2021

    @rylev
    ContributorAuthor

    I don't think it'd be a good idea to require testing rustdoc in the Git for Windows bash shell. I'd like for this to work in cmd.exe and PowerShell if possible.

  6. added a commit that references this issue on Mar 3, 2021
    0c7e898
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-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustA-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.O-windowsOperating system: WindowsT-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

      Issue actions