Skip to content

bootstrap: Improve the UX when run from a git worktree #77621

Open
@jyn514

Description

@jyn514

it would be nice if bootstrap could auto-detect when it's being run from a git worktree and share

original issue description

It should look something like this behind the scenes:

$ x.py setup --worktree ../rustc2
Setting up a new worktree at `/home/joshua/rustc2`  # runs `git worktree add ../rustc2`
# all the current prompts, but config.toml is written to rustc2 instead of the current directory
# does *not* suggest to set up a git hook

This would make https://rustc-dev-guide.rust-lang.org/building/suggested.html?highlight=worktree#working-on-multiple-branches-at-the-same-time a lot more discoverable.

It should also use the submodule suggestions from https://rust-lang.zulipchat.com/#narrow/stream/182449-t-compiler.2Fhelp/topic/script.20to.20quickly.20generate.20complete.20git.20worktree (cc @lzutao), which would prevent cloning llvm more than once.

This would help work around #77620.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustC-feature-requestCategory: A feature request, i.e: not implemented / a PR.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.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