rust-lang / rust-lang/rust

Changes to git submodules must be staged or commited to take effect

Open
#144,077 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-git C-bug T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

I used submodule set-{url,branch} to point src/llvm-project against my own fork. Confusingly, bootstrap kept reverting to the original commit.
https://github.com/rust-lang/rust/blob/bf5e6cc7a7a7eb03e3ed9b875d76530eddd47d5f/src/bootstrap/src/core/config/config.rs#L1422-L1427

recorded uses the current commit staged in git. I'm not sure if this is a bug, but it was a bit surprising and unintuitive.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the submodule set-url/set-branch workflow for src/llvm-project and observe bootstrap reverting to the original commit. Read src/bootstrap/src/core/config/config.rs around lines 1422-1427, focusing on how recorded obtains the staged commit. Done means the behavior is understood and the issue is either corrected or clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.