Skip to content

./x.py check library panics #89490

Description

@lopopolo

I ran ./x.py check library.

I expected this command to check all crates defined in the library directory or at least print a useful error.

Instead, I got a panic.

$ ./x.py check library
Updating only changed submodules
Submodules updated in 0.03 seconds
    Finished dev [unoptimized + debuginfo] target(s) in 0.18s
thread 'main' panicked at 'error: no rules matched library', src/bootstrap/builder.rs:236:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:01

Meta

rust HEAD:

commit 4479cb82e52989480a238e0cf8c67e04b655b36d (upstream/master, master)
Merge: c24c9067eec 1139ee32aa8
Author: bors <bors@rust-lang.org>
Date:   Sun Oct 3 10:34:57 2021 +0000

    Auto merge of #89459 - tspiteri:idiv-overflow-bitand, r=kennytm

    Use bitand when checking for signed integer division overflow

    For `self == Self::MIN && rhs == -1`, LLVM does not realize that this is the same check made by `self / rhs`, so the code generated may have some unnecessary duplication. For `(self == Self::MIN) & (rhs == -1)`, LLVM realizes it is the same check.

Activity

  1. jyn514 commented on Oct 3, 2021

    @jyn514
    Member

    @lopopolo you want x.py check library/std. It wouldn't hurt to make library an alias for that I suppose.

  2. added
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    C-enhancementCategory: An issue proposing an enhancement or a PR with one.
    and removed
    C-bugCategory: This is a bug.
    on Oct 3, 2021
  3. Mark-Simulacrum commented on Oct 3, 2021

    @Mark-Simulacrum
    Member

    I would prefer to avoid those aliases, but we should have the full list of paths on hand so we could do something like "did you mean" and print out paths that could start with library/

  4. SkiFire13 commented on Oct 4, 2021

    @SkiFire13
    Contributor

    I think library an alias doesn't have a clear default: would it be just library/std, or both library/std, library/alloc and library/core, or all the library/*? I feel like a shortcut for library/std, library/alloc and library/core might be useful though, since often a change in core might have an impact in a test of the other two crates, so you might want to test all of them just to be sure.

    Going back to this issue, I think a panic gives a bad UX here, it's not an unexpected error that should never happen!

  5. jyn514 commented on Oct 4, 2021

    @jyn514
    Member

    @SkiFire13 right now x.py treats all four of those paths you mention as the same, it doesn't know how to build individual crates.

  6. SkiFire13 commented on Oct 4, 2021

    @SkiFire13
    Contributor

    @jyn514 that doesn't seem to include tests though. If I make a test fail in library/core and then run x.py test library/std I don't see any failure pop up, but I do when I run x.py test library/core.

  7. jyn514 commented on Jul 11, 2022

    @jyn514
    Member

    Implemented in #95504.

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

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions