| Age | Commit message (Collapse) | Author | Lines |
|
|
|
Make `nodejs` control the default for RustdocJs tests instead of a hard-off switch
If someone says `x test rustdoc-js-std` explicitly on the command line, it's because they want to run the tests. Give an error instead of doing nothing and reporting success.
Before:
```
; x t rustdoc-js
No nodejs found, skipping "tests/rustdoc-js" tests
Build completed successfully in 0:00:00
```
After:
```
; x t rustdoc-js
thread 'main' panicked at 'need nodejs to run js-doc-test suite', test.rs:1566:13
Build completed unsuccessfully in 0:00:00
```
I recommend viewing the diff with whitespace changes disabled.
r? ````@GuillaumeGomez````
|
|
Bump bootstrap to 1.72 beta
|
|
Fix bootstrap.py uname error
The x.py script fails with `ValueError: too many values to unpack (expected 3)` when uname -smp gives more than 3 words
The error I got:
```
❯ ./x check
Traceback (most recent call last):
File "/data1/edgar/rust/x.py", line 50, in <module>
bootstrap.main()
File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 1113, in main
bootstrap(args)
File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 1070, in bootstrap
build = RustBuild(config_toml, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 505, in __init__
self.build = args.build or self.build_triple()
^^^^^^^^^^^^^^^^^^^
File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 976, in build_triple
return config or default_build_triple(self.verbose)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data1/edgar/rust/src/bootstrap/bootstrap.py", line 259, in default_build_triple
kernel, cputype, processor = uname.decode(default_encoding).split()
^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: too many values to unpack (expected 3)
```
This is because
```
❯ uname -smp
Linux x86_64 AMD Ryzen 7 5800X 8-Core Processor
```
Returns more than 3 space separated words.
|
|
switch
If someone says `x test rustdoc-js-std` explicitly on the command line, it's because they want to
run the tests. Give an error instead of doing nothing and reporting success.
|
|
|
|
Don't fail early if `try_run` returns an error
Fixes https://github.com/rust-lang/rust/issues/113208.
Follow-up of #112962.
r? `@jyn514`
|
|
The x.py script fails with `ValueError: too many values to unpack (expected 3)` when uname -smp gives more than 3 words
|
|
Revert "fix: :bug: etc/bash_complettion -> src/etc/... to avoid copy …
## why
- [x] revert my broken PR
https://github.com/rust-lang/rust/pull/110906
This reverts commit 08ce68b6a6bad360e9c3611ad60cf6598401f878.
|
|
various download-rustc fixes
separated out from https://github.com/rust-lang/rust/pull/112143 because it keeps getting stuck in limbo.
best reviewed commit-by-commit
|
|
|
|
This reverts commit 08ce68b6a6bad360e9c3611ad60cf6598401f878.
|
|
|
|
bootstrap: Don't print "Skipping" twice
Bootstrap executes itself twice: once with DryRun::SelfCheck and DryRun::Disabled. Change it not to print the "Skipping" message if SelfCheck is enabled.
See https://github.com/rust-lang/rust/actions/runs/5503931599/jobs/10029625567?pr=113514#step:24:772.
|
|
Bootstrap executes itself twice: once with DryRun::SelfCheck and DryRun::Disabled.
Change it not to print the "Skipping" message if SelfCheck is enabled.
See https://github.com/rust-lang/rust/actions/runs/5503931599/jobs/10029625567?pr=113514#step:24:772.
|
|
Copy stage0 `rustc` binaries to `stage0-sysroot`
This is basically a revival of https://github.com/rust-lang/rust/pull/101711 and https://github.com/rust-lang/rust/pull/107956, with an added check that the full sysroot will only be created if the original rustc comes from `stage0/bin`.
What is/should be tested:
- [x] `rustup toolchain link stage0` (new libstd is used correctly)
- [x] `python3 x.py fmt dist --stage 0`
- [x] Custom rustc/cargo in `config.toml` (in this case this logic is ignored)
- [x] Perfbot (try perf run has succeeded)
- [x] Real use case (https://github.com/rust-lang/backtrace-rs/pull/542)
(Hopefully) fixes: https://github.com/rust-lang/rust/issues/101691
This is not the "end all, be all" solution to this problem, but as long as it resolves the basic use-case, and doesn't break perfbot, I say ship it. This code will probably be nuked anyway Soon™ because of the stage redesign.
|
|
Use String or Int to set the opt level
Address https://github.com/rust-lang/rust/pull/112756/files#r1249345725
Use String or Int to set the opt level.
r? ``@jyn514``
|
|
|
|
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
|
|
Rollup of 7 pull requests
Successful merges:
- #112931 (Enable zlib in LLVM on aarch64-apple-darwin)
- #113158 (tests: unset `RUSTC_LOG_COLOR` in a test)
- #113173 (CI: include workflow name in concurrency group)
- #113335 (Reveal opaques in new solver)
- #113390 (CGU formation tweaks)
- #113399 (Structurally normalize again for byte string lit pat checking)
- #113412 (Add basic types to SMIR)
r? `@ghost`
`@rustbot` modify labels: rollup
|
|
This was removed in
https://github.com/rust-lang/rust/pull/113260/commits/de69d556eb5006a21f868b8c12d48f0ef1308a5a#diff-8479eab02701e686aedb15b567dc8fc31220c6e4efb9565ccc9d662b7fee2214
which caused CI to ignore clippy failures. This adds back the exit,
which should cause CI to fail again if a test is broken (like right
now, as clippy tests are broken on master).
|
|
Enable zlib in LLVM on aarch64-apple-darwin
Works on macOS 13.4, Xcode version 14.3.1.0.1.1683849156
This was disabled in #75500 on Apple Silicon Developer Transition Kit, but Apple appears to have fixed their zlib now
|
|
Fix submodule handling when the current branch is named after a tag
If:
1. The current branch has the same name as git tag, and
2. The current branch is set to track a remote other than `origin`, and
3. We try to update a submodule
then we'll get the following error:
```
; x c
Updating submodule src/doc/reference
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
fatal: 'personal' does not appear to be a git repository
fatal: Could not read from remote repository.
```
The problem is that 1. causes `git symbolic-ref --short HEAD` to try and disambiguate the branch from the tag using `heads/branch-name`, which breaks a previous workaround for a bug in `git submodule update` that uses the wrong remote.
Adapt the workaround to strip `heads/` from the output.
|
|
by using `rustc-builds-alt` if download-rustc is set
this also changes the download code to use a separate build/cache/ directory and .rustc-stamp stamp file depending on whether assertions are enabled.
|
|
|
|
|
|
Previously, it would always treat download-rustc as set to false, which made bootstrap issues with
download-rustc hard to debug.
|
|
If:
1. The current branch has the same name as git tag, and
2. The current branch is set to track a remote other than `origin`, and
3. We try to update a submodule
then we'll get the following error:
```
; x c
Updating submodule src/doc/reference
remote: Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
fatal: 'personal' does not appear to be a git repository
fatal: Could not read from remote repository.
```
The problem is that 1. causes `git symbolic-ref --short HEAD` to try and disambiguate the branch
from the tag using `heads/branch-name`, which breaks a previous workaround for a bug in `git
submodule update` that uses the wrong remote.
Adapt the workaround to strip `heads/` from the output.
|
|
Add support for NetBSD/riscv64 aka. riscv64gc-unknown-netbsd.
|
|
rust-installer & rls: remove exclusion from rustfmt & tidy
<strike>based on #112884</strike>
`rust-installer` and `rls` no longer submodules, but not removed from exclude list for rustfmt and tidy, preventing running fmt and lints on them.
|
|
|
|
Add simple markdown formatting to `rustc --explain` output
This is a second attempt at #104540, which is #63128 without dependencies.
This PR adds basic markdown formatting to `rustc --explain` output when available. Currently, the output just displays raw markdown: this works of course, but it really doesn't look very elegant. (output is `rustc --explain E0038`)
<img width="583" alt="image" src="https://github.com/rust-lang/rust/assets/13724985/ea418117-47af-455b-83c0-6fc59276efee">
After this patch, sample output from the same file:
<img width="693" alt="image" src="https://github.com/rust-lang/rust/assets/13724985/12f7bf9b-a3fe-4104-b74b-c3e5227f3de9">
This also obeys the `--color always/auto/never` command option. Behavior:
- If pager is available and supports color, print with formatting to the pager
- If pager is not available or fails print with formatting to stdout - otherwise without formatting
- Follow `--color always/never` if suppied
- If everything fails, just print plain text to stdout
r? `@oli-obk`
cc `@estebank`
(since the two of you were involved in the previous discussion)
|
|
|
|
|
|
|
|
Currently, the output of `rustc --explain foo` displays the raw markdown in a
pager. This is acceptable, but using actual formatting makes it easier to
understand.
This patch consists of three major components:
1. A markdown parser. This is an extremely simple non-backtracking recursive
implementation that requires normalization of the final token stream
2. A utility to write the token stream to an output buffer
3. Configuration within rustc_driver_impl to invoke this combination for
`--explain`. Like the current implementation, it first attempts to print to
a pager with a fallback colorized terminal, and standard print as a last
resort.
If color is disabled, or if the output does not support it, or if printing
with color fails, it will write the raw markdown (which matches current
behavior).
Pagers known to support color are: `less` (with `-r`), `bat` (aka `catbat`),
and `delta`.
The markdown parser does not support the entire markdown specification, but
should support the following with reasonable accuracy:
- Headings, including formatting
- Comments
- Code, inline and fenced block (no indented block)
- Strong, emphasis, and strikethrough formatted text
- Links, anchor, inline, and reference-style
- Horizontal rules
- Unordered and ordered list items, including formatting
This parser and writer should be reusable by other systems if ever needed.
|
|
Update Clippy
r? `@Manishearth`
cc `@oli-obk` (for the ui-test changes in de69d556eb5006a21f868b8c12d48f0ef1308a5a and the valtree fix in 0cbe963e51faa7e3e771c1f9cea9aa443a648455)
Fixes https://github.com/rust-lang/rust/issues/102093
This must've been the most involved Clippy sync ever.
|
|
|
|
Make Rust Analyzer tests faster by compiling less code
This should bring down the test duration of RA significantly.
|
|
Don't pass --test-args to `python -m unitest`
The args for unittest and cargo test are mutually incompatible. Suggest that people use `python -m unittest ...` manually instead.
This also changes `bootstrap_test.py` to be easier to run standalone; see the commit for details.
r? `@clubby789` cc https://github.com/rust-lang/rust/pull/112281#discussion_r1248849172
|
|
Use RustOptimize to set optimize
close https://github.com/rust-lang/rust/issues/112678
Use RustOptimize to set optimize.
|
|
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
|
|
|
|
The args for unittest and cargo test are mutually incompatible. Suggest that people use `python -m unittest ...` manually instead.
This also changes `bootstrap_test.py` to be easier to run standalone; see the commit for details.
|
|
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
|
|
Signed-off-by: hi-rustin <rustin.liu@gmail.com>
|
|
The windows tarballs and installers expect rust-analyzer to be present, but
it's not always the case. For example, in try builds.
|
|
The windows tarballs and installers expect clippy to be present, but
it's not always the case. For example, in try builds.
|
|
Set `channel = nightly` in dist profile
This avoids some channel-specific defaults leaking into local installs. It also makes it easier to set options for compiler/library/codegen profiles in the future, since they can be gated off `channel` instead of being duplicated between all three files.
Here are the exact things `channel` controls today:
https://github.com/rust-lang/rust/blob/68d458bb402b873b9ae80423710c2672967479df/src/bootstrap/llvm.rs#L466-L470
https://github.com/rust-lang/rust/blob/85c4ea0138fcca2e8cf4515a063cd3b762d64aec/src/bootstrap/config.rs#L1374-L1375
https://github.com/rust-lang/rust/blob/85c4ea0138fcca2e8cf4515a063cd3b762d64aec/src/bootstrap/config.rs#L1464-L1465
``@cuviper`` i expect you don't want any of those to be set in distro builds, right?
|
|
|