Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rustbuild] do not delete sysroot directory #34279

Open
nagisa opened this issue Jun 14, 2016 · 4 comments
Open

[rustbuild] do not delete sysroot directory #34279

nagisa opened this issue Jun 14, 2016 · 4 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@nagisa
Copy link
Member

nagisa commented Jun 14, 2016

I tend to put various test files into $DESTINATION/stage1/bin so I can have a different terminal open and quickly test stage1 rustc against various test cases I have at hand for a particular thing I’m working on at the time without cluttering root of my checkout.

rustbuild deleting the destination directory every build is inherently incompatible with this workflow. Consider not doing it.

@nagisa nagisa added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jun 14, 2016
@nagisa nagisa changed the title rustbuild do not delete destination directory [rustbuild] do not delete destination directory Jun 14, 2016
@alexcrichton
Copy link
Member

Yeah right now this is done to ensure we clean everything out, but this definitely bit Cargo in the past so we should probably figure our a more principled way of doing this.

@Mark-Simulacrum Mark-Simulacrum added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jul 25, 2017
@Mark-Simulacrum Mark-Simulacrum added this to the impl period milestone Sep 15, 2017
@aturon aturon removed this from the impl period milestone Sep 15, 2017
@jyn514
Copy link
Member

jyn514 commented Jun 27, 2022

@jyn514
Copy link
Member

jyn514 commented Jun 27, 2022

I think this is hard to do in a way that's not surprising. Consider the following invocations:

  1. rustdoc +stage1 --version: error: 'rustdoc' is not installed for the toolchain 'stage1' (good, it's never been built so we should error)
  2. x build --stage 1 && rustdoc +stage1 --version: rustdoc 1.63.0-dev (good, we just built it)
  3. some edit to compiler/
  4. x build --stage 1 library/std && rustdoc +stage1 --version: rustdoc 1.63.0-dev (confusing, this is using an outdated version of rustdoc that doesn't have your latest edits

I suppose we could only delete files we know that bootstrap generates, but that seems quite difficult to maintain ...

@jyn514 jyn514 changed the title [rustbuild] do not delete destination directory [rustbuild] do not delete sysroot directory Jun 27, 2022
@jyn514
Copy link
Member

jyn514 commented May 24, 2023

RalfJung mentions that this makes it annoying (and due to #90244, currently impossible) to have both rustc_private and rustdoc artifacts in the same sysroot.

davidtwco mentions that this means that running x check between invocations of x build breaks --keep-stage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

No branches or pull requests

5 participants