| Age | Commit message (Collapse) | Author | Lines |
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
force "HEAD" for non-CI and `git_upstream_merge_base` for CI environment
When rust-lang/rust is configured as remote, some of the git logic (for tracking changed files) that uses get_closest_merge_commit starts to produce annoying results as the upstream branch becomes outdated quickly (since it isn't updated with git pull). We can rely on HEAD for non-CI environments as we specifically treat bors commits as merge commits, which also exist on upstream. As for CI environments, we should use `git_upstream_merge_base` to correctly track modified files as bors commits may be in `HEAD` but not yet on the upstream remote.
This is also an alternative fix for https://github.com/rust-lang/rust/issues/129528 since https://github.com/rust-lang/rust/pull/131331 reverts the previous fix attempts.
|
|
When rust-lang/rust is configured as remote, some of the git
logic (for tracking changed files) that uses get_closest_merge_commit
starts to produce annoying results as the upstream branch becomes outdated
quickly (since it isn't updated with git pull). We can rely on HEAD for
non-CI environments as we specifically treat bors commits as merge commits,
which also exist on upstream. As for CI environments, we should use
`git_upstream_merge_base` to correctly track modified files as bors commits
may be in `HEAD` but not yet on the upstream remote.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
r=albertlarsan68"
This reverts commit 776187d2c9a42dc07452ae36a8b765d66bd8e2ca, reversing
changes made to 7d015575ada1de8a4627fcdea416194a57a175c2.
|
|
lolbinarycat:bootstrap-warn-old-upstream-worktree, r=albertlarsan68"
This reverts commit 507c05bead4026ed8841512095b4218119eb479f, reversing
changes made to 0609062a91c8f445c3e9a0de57e402f9b1b8b0a7.
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
r=albertlarsan68
bootstrap: handle worktrees in warn_old_master_branch
fixes #130111
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Compare to `get_git_merge_base`, this doesn't require configuring the upstream remote.
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
fixes #130111
|
|
fixes https://github.com/rust-lang/rust/issues/129528
|
|
The previous commit updated `rustfmt.toml` appropriately. This commit is
the outcome of running `x fmt --all` with the new formatting options.
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
It was only used in bootstrap. This move allows us to modify the function to work with `BootstrapCommand`, rather than `Command`.
|
|
r=Mark-Simulacrum
use "bootstrap" instead of "rustbuild" in comments and docs
Let's stick with the single name "bootstrap" to refer to the bootstrap project to avoid confusion. This should make it clearer, especially for new contributors.
|
|
|
|
This should make it quicker to debug command failures.
|
|
Before, only the line was stored. This was enough for run-make tests, since these mostly only contain a single `rmake.rs` file, but not for bootstrap.
|
|
So that it can be also used in bootstrap.
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
tidy: skip submodules if not present for non-CI environments
Right now tidy requires rustc-perf to be fetched as it checks its license, but this doesn't make sense for most contributors since rustc-perf is a dist-specific tool and its license will not change frequently, especially during compiler development. This PR makes tidy to skip rustc-perf if it's not fetched and if it's not running in CI.
Applies https://github.com/rust-lang/rust/pull/126225#issuecomment-2158143674 and reverts #126225.
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
These are the default package set required by opt-dist to correctly work,
hence for people wanting to build a production grade of rustc in a
sandboxed / air-gapped environment, these need to be vendored.
The size of `rustc-src-nightly.tar.xz` before and after this change:
* Before: 298M
* After: 323M (+8%)
These crates are the default set of packages required by opt-dist
to correctly work, hence for people wanting to build a production grade
of rustc in an sandboxed / air-gapped environment, these need to be vendored.
The size of `rustc-src-nightly.tar.xz` before and after this change:
* Before: 298M
* After: 323M (+8%)
Size change might or might not be a concern.
See the previous discussion: https://github.com/rust-lang/rust/pull/125166#issuecomment-2113626468
Previous efforts on making:
* https://github.com/rust-lang/rust/pull/125125
* https://github.com/rust-lang/rust/pull/125166
---
Note that extra works still need to be done to make it fully vendored.
* The current pinned rustc-perf uses `tempfile::Tempdir` as the working
directory when collecting profiles from some of these packages.
This "tmp" working directory usage make it impossible for Cargo to pick
up the correct vendor sources setting in `.cargo/config.toml` bundled
in the rustc-src tarball. [^1]
* opt-dist verifies the final built rustc against a subset of rustc test
suite. However it rolls out its own `config.toml` without setting
`vendor = true`, and that results in `./vendor/` directory removed.
[^2]
[^1]: https://github.com/rust-lang/rustc-perf/blob/4f313add609f43e928e98132358e8426ed3969ae/collector/src/compile/benchmark/mod.rs#L164-L173
[^2]: https://github.com/rust-lang/rust/blob/606afbb617a2949a4e35c4b0258ff94c980b9451/src/tools/opt-dist/src/tests.rs#L62-L77
|
|
|
|
Somehow these files aren't properly formatted. By default `x fmt` and `x
tidy` only check files that have changed against master, so if an
ill-formatted file somehow slips in it can stay that way as long as it
doesn't get modified(?)
I found these when I ran `x fmt` explicitly on every `.rs` file in the
repo, while working on
https://github.com/rust-lang/compiler-team/issues/750.
|
|
Signed-off-by: onur-ozkan <work@onurozkan.dev>
|
|
|
|
|
|
The git integration in build_helper hardcoded `rust-lang/rust` as the
parent GitHub repository, and `master` as the branch name. This works
great for `rust-lang/rust`, but causes problems in downstream forks like
Ferrocene whenever those functions are invoked (like `./x fmt`).
In `src/stage0.json` there was already a configuration key for the name
of the nightly branch, but it wasn't used by build_helper. This commit
adds the `github_repository` key to the file, and requires both values
to be passed to build_helper whenever a git function is called. This
will allow downstream forks to tweak the values.
|
|
Print GHA log groups to stdout instead of stderr
In all other places (e.g. `bootstrap.py`, `opt-dist`), we use stdout instead of stderr. I think that using stderr might be causing some discrepancies in the log, where sometimes the contents of a group "leak" outside the group. Let's see what happens if we use stdout instead. It's possible that it will be worse, since we print most stuff to stderr (?).
r? `@ghost`
|
|
|
|
In all other places (e.g. `bootstrap.py`, `opt-dist`), we use stdout instead of stderr. I think that using stderr might be causing some discrepancies in the log, where sometimes the contents of a group "leak" outside the group. Let's see what happens if we use stdout instead. It's possible that it will be worse, since we print most stuff to stderr (?).
|
|
This reverts commit 849f4f8845ad3104596244874d9e8a087ca2e15b, reversing
changes made to 02426434e2ff0194e41dcd8420e9c87346149985.
|
|
bootstrap: use git merge-base for LLVM CI download logic
Fixes https://github.com/rust-lang/rust/issues/101907
I tested this with a local branch that has extra merge commits due to Miri, and it worked fine there. But I am sure there are tons of other situations I did not think of...
r? `@jyn514`
|
|
Co-authored-by: Albert Larsan <albertlarsan@unbon.cafe>
|
|
|
|
|
|
misc bootstrap cleanups
- rename `detail_exit_macro` to `exit`
- remove unnecessary `Builder::new_standalone` function
- support `x suggest` with build-metrics
|
|
this makes the panics on nested GHA groups more useful
|
|
This also adds a dynamic check that we don't emit nested groups, since GHA currently doesn't support them.
|
|
`detail` and `macro` weren't adding any info.
|
|
|
|
|
|
|
|
|
|
Before:
```
Building stage0 tool jsondocck (x86_64-unknown-linux-gnu)
Building stage0 tool jsondocck (x86_64-unknown-linux-gnu)
Downloading crates ...
```
After:
```
Building stage0 tool jsondocck (x86_64-unknown-linux-gnu)
Downloading crates ...
```
|
|
Signed-off-by: ozkanonur <work@onurozkan.dev>
|
|
|