Skip to content

Don't automatically update submodules when running x.py #53970

Closed
@oli-obk

Description

@oli-obk

#53916 (comment) noted that the submodules setting of config.toml is not very discoverable.

I have set it to false in all my trees and update my submodules manually, because I've had work destroyed multiple times when I changed submodule contents and x.py killed them without asking by force updating the submodule to the commit checked into the rustc repo.

There are a few (not mutually exclusive) ways to improve this:

  1. don't update submodules if they are dirty (modified files, new files)
  2. don't update submodules if the current commit is newer than the one x.py wants to update to (so only go forward automatically, not backwards)
  3. set submodules = false by default (might inconvenience developers that never touch submodules, I am biased here due to touching clippy and miri on a very regular basis)

cc @nnethercote @rkruppe

Metadata

Metadata

Assignees

No one assigned

    Labels

    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