Skip to content

We should build ALL Rust code in this repo in CI #136406

Open

Description

@safinaskar

We should build ALL Rust code in this repo when we do ./x test in CI. Including subtrees. This is needed to ensure that contributors will not occasionally break anything, especially when doing tree-wide changes.

For example, in #134420 a contributor replaced tree-wide &PathBuf with &Path. Unfortunately, he broke ./x perf. This was not noticed, because src/tools/rustc-perf-wrapper is not built during ./x test CI. (Later he fixed that problem.)

So, please, build everything in ./x test CI, including subtrees.

I add "contributor roadblock", because I think this is minor contributor roadblock.

@rustbot label A-contributor-roadblock C-enhancement -C-bug

HEAD

fd19773

Activity

  1. added
    C-bugCategory: This is a bug.
    T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
    on Feb 1, 2025
  2. added
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to Rust
    C-enhancementCategory: An issue proposing an enhancement or a PR with one.
    and removed
    C-bugCategory: This is a bug.
    on Feb 1, 2025
  3. removed
    needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
    on Feb 2, 2025
  4. onur-ozkan commented on Feb 2, 2025

    @onur-ozkan
    Contributor

    We can't compile all Rust code with the x test command because some dependencies are gated by config.toml and the host machine, but we can definitely extend the scope of x test compilation.

  5. added
    A-testsuiteArea: The testsuite used to check the correctness of rustc
    A-test-infraArea: test infrastructure (may span bootstrap/compiletest/more)
    on Feb 3, 2025
  6. cuviper commented on Feb 4, 2025

    @cuviper
    Member

    For downstream builds, I appreciate that the current x test covers pretty much what I'm going to ship, whereas stuff like perf is not really relevant. If the default x test grew, then it would be annoying to manually enumerate all the things it used to cover.

    So maybe there should be a broader pseudo-target for those that want more, like x test all, or maybe the other way with some name that means the smaller set it used to test. Or maybe there could be a config with different defaults between profiles.

  7. changed the title [-]We should build ALL Rust code in this repo when we do ./x test[/-] [+]We should build ALL Rust code in this repo in CI[/+] on Feb 4, 2025
  8. safinaskar commented on Feb 4, 2025

    @safinaskar
    ContributorAuthor

    @cuviper , what I really meant is "to build all code in CI". I updated my post and title

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-test-infraArea: test infrastructure (may span bootstrap/compiletest/more)A-testsuiteArea: The testsuite used to check the correctness of rustcC-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