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

x.py build no longer works with outdated submodules #57080

Closed
matthiaskrgr opened this issue Dec 23, 2018 · 3 comments · Fixed by #60379
Closed

x.py build no longer works with outdated submodules #57080

matthiaskrgr opened this issue Dec 23, 2018 · 3 comments · Fixed by #60379
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Comments

@matthiaskrgr
Copy link
Member

If a submodule is not up to date and I have submodules = true set in the config.toml and run ./x.py build, crashes:

Updating only changed submodules
Updating submodule src/tools/clippy
usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
   or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] init [--] [<path>...]
   or: git submodule [--quiet] deinit [-f|--force] (--all| [--] <path>...)
   or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--[no-]recommend-shallow] [--reference <repository>] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
   or: git submodule [--quiet] foreach [--recursive] <command>
   or: git submodule [--quiet] sync [--recursive] [--] [<path>...]
   or: git submodule [--quiet] absorbgitdirs [--] [<path>...]
failed to run: git submodule -q sync --progress src/tools/clippy
Build completed unsuccessfully in 0:00:00

This used to work before 16329b0 , probably caused by #56933
cc @clarcharr

@matthiaskrgr matthiaskrgr changed the title x.py build no longer works on x.py build no longer works on outdated submodules Dec 23, 2018
@matthiaskrgr matthiaskrgr changed the title x.py build no longer works on outdated submodules x.py build no longer works with outdated submodules Dec 23, 2018
@clarfonthey
Copy link
Contributor

Oh, I guess that my test wasn't thorough enough. Posted my comments in #57082.

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Dec 24, 2018
./x.py used to automatically check out the right commit when a submodule was outdated and ./x.py build was run
and submodules handling was enabled in config.toml (submodules = true).

But it threw an error:
[...]
failed to run: git submodule -q sync --progress src/tools/clippy

The commit removes the --progress from git submodule call.

Fixes rust-lang#57080
bors added a commit that referenced this issue Dec 24, 2018
x.py: fixup 6130fc8, fix submodule handling

./x.py used to automatically check out the right commit when a submodule was outdated and ./x.py build was run
and submodules handling was enabled in config.toml (submodules = true).

But it threw an error:
[...]
failed to run: git submodule -q sync --progress src/tools/clippy

The commit removes the --progress from git submodule call.

Fixes #57080
@zackmdavis
Copy link
Member

This still bit me yesterday.

zmd@MutualBestResponse:~/Code/rust$ ./x.py build --stage 1 
Updating only changed submodules
Updating submodule src/doc/rustc-guide
usage: git submodule [--quiet] add [-b <branch>] [-f|--force] [--name <name>] [--reference <repository>] [--] <repository> [<path>]
   or: git submodule [--quiet] status [--cached] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] init [--] [<path>...]
   or: git submodule [--quiet] deinit [-f|--force] [--] <path>...
   or: git submodule [--quiet] update [--init] [--remote] [-N|--no-fetch] [-f|--force] [--checkout|--merge|--rebase] [--reference <repository>] [--recursive] [--] [<path>...]
   or: git submodule [--quiet] summary [--cached|--files] [--summary-limit <n>] [commit] [--] [<path>...]
   or: git submodule [--quiet] foreach [--recursive] <command>
   or: git submodule [--quiet] sync [--recursive] [--] [<path>...]
failed to run: git submodule update --init --recursive --progress src/doc/rustc-guide
Build completed unsuccessfully in 0:00:00

#57082 only removed one of the two --progress arguments introduced in #56933. (I'm still on Ubuntu Xenial, which is still in service until 2021 and ships Git 2.7.4. I wonder if would it be too petty if I sent a PR to make bootstrap.py check the Git version in order to decide whether to pass --progress? I think it's convenient to be able to hack on rustc with a moderately old Git version.)

@zackmdavis zackmdavis reopened this Feb 5, 2019
@theronic
Copy link

Just got nailed by this on a Debian install trying to custom compile Rust for MIPS. Removing the --progress argument got me past this, thanks @zackmdavis.

@estebank estebank added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Mar 4, 2019
froydnj added a commit to froydnj/rust that referenced this issue Apr 29, 2019
If we fail to run with `--progress`, try running without instead.

Fixes rust-lang#57080.
bors added a commit that referenced this issue May 2, 2019
intelligently handle older version of git in bootstrap

If we fail to run with `--progress`, try running without instead.

Fixes #57080.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants