Commit graph

6534 commits

Author SHA1 Message Date
onur-ozkan
61bda87b0d Move mod cargo below the import statements
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2025-01-08 14:19:04 +00:00
bors
4363f9b6f6 Auto merge of #135040 - matthiaskrgr:rollup-34vsa8n, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #135016 (Ping me for rustc-dev-guide subtree changes on this repo)
 - #135027 (Remove range-metadata amdgpu workaround)
 - #135029 (Update mailmap)
 - #135033 (try to dedup me in the mailmap)
 - #135035 (Fix formatting command)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-02 19:02:41 +00:00
Matthias Krüger
666794e5c7
Rollup merge of #135035 - Noratrieb:fixfmt, r=jieyouxu
Fix formatting command

The formatting command previously had two issues:
- if rustfmt failed, it would print the command invocation. this is unnecessarily noisy
- there was a race condition that lead to orphan rustfmts that would print their output after bootstrap exited

We fix this by
- removing the printing, it's not really useful
- threading failure through properly instead of just yoloing exit(1)
2025-01-02 18:27:22 +01:00
Noratrieb
8b73fc5e27 Fix formatting command
The formatting command previously had two issues:
- if rustfmt failed, it would print the command invocation. this is
  unnecessarily noisy
- there was a race condition that lead to orphan rustfmts that would
  print their output after bootstrap exited

We fix this by
- removing the printing, it's not really useful
- threading failure through properly instead of just yoloing exit(1)
2025-01-02 17:26:46 +01:00
bors
1b2745d72a Auto merge of #135014 - Zalathar:tool-build-step, r=jieyouxu
bootstrap: Overhaul and simplify the `tool_extended!` macro

Similar to #134950, but for the macro that declares build steps for some tools.

The main changes are:
- Removing some functionality that isn't needed by any of the tools currently using the macro
- Moving some code out of the macro and into ordinary helper functions
- Switching to one macro invocation per tool, and struct-like syntax so that rustfmt will format them

There should be no functional change.
2025-01-02 16:18:28 +00:00
许杰友 Jieyou Xu (Joe)
552c1f5f45 bootstrap: temporarily flip compile::Rustc vs compile::Assemble
The PathSet prefix matching unfortunately also has implications for `./x
build compiler`, because the path filter `"compiler"` gets consumed by
`compile::Rustc` step first after PathSet prefix matching, whereas
before PathSet prefix matching, the later-registered `compile::Assemble`
step would've consumed the `"compiler"` path filter.

This merely papers over the issue with PathSet prefix handling to
unblock contributors for using `./x build compiler`.
2025-01-02 21:00:14 +08:00
Zalathar
5a32a35ab7 Move most of Step::should_run out of tool_extended! 2025-01-02 18:43:34 +11:00
Zalathar
08d70f57e2 Use struct-like syntax in tool_extended!
Using struct-like syntax allows rustfmt to format macro invocations, instead of
giving up and ignoring them.

Using a separate macro invocation per tool makes the macro slightly simpler,
and isolates syntax errors to individual invocations.
2025-01-02 18:43:34 +11:00
Zalathar
725fccda2b Move most of Step::run out of tool_extended! 2025-01-02 18:43:33 +11:00
Zalathar
bba24a2ffe Don't pass (self, builder) identifiers to tool_extended! 2025-01-02 17:47:13 +11:00
Zalathar
b84c54ac87 Remove two unused parameters from tool_extended! 2025-01-02 17:47:13 +11:00
Zalathar
e76c484d6d Remove the unused extra_features field from tool_extended!
This field was introduced in #48097 to support the "clippy" feature of RLS.
2025-01-02 17:47:13 +11:00
bors
c528b8c678 Auto merge of #134907 - Kobzol:rustc-dev-guide-josh, r=ehuss
Turn rustc-dev-guide into a Josh subtree

Discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/196385-t-compiler.2Fwg-rustc-dev-guide/topic/a.20move.20to.20main.20repo.20.28rust-lang.2Frust.29).

Accompanying rustc-dev-guide PR: https://github.com/rust-lang/rustc-dev-guide/pull/2183

I didn't create a bootstrap step for rustc-dev-guide yet, because the rustc-dev-guide version that we currently use in this repo doesn't have linkcheck enabled and that fails tests.

The subtree starts with commit [ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e](ad93c5f1c4).

What I did:
```
export DIR=src/doc/rustc-dev-guide

# Remove submodule
git submodule status ${DIR}
git submodule deinit ${DIR}
git rm -r --cached ${DIR}
rm -rf ${DIR}
# Remove rustc-dev-guide from .gitmodules
git commit -m"Removed `${DIR}` submodule"

# Import history with josh
git fetch https://github.com/rust-lang/rustc-dev-guide ad93c5f1c49f2aeb45f7a4954017b1e607df9f5e
josh-filter ':prefix=src/doc/rustc-dev-guide' FETCH_HEAD
git merge --allow-unrelated FILTERED_HEAD

# A few follow-up cleanup commits
```

r? ehuss
2025-01-02 03:05:42 +00:00
Matthias Krüger
afdb6270ef
Rollup merge of #134967 - onur-ozkan:auto-submodule-handler, r=jieyouxu
handle submodules automatically on `doc` steps

Helps to make `doc` macros less complicated.
2025-01-01 22:04:15 +01:00
Jakub Beránek
47e2baa1c9 Remove mention of rustc-dev-guide from toolstate 2025-01-01 17:06:58 +01:00
Jakub Beránek
5c0c0f41f4 Remove obsolete RustcGuide bootstrap step
It was not working for a long time.
2025-01-01 17:06:27 +01:00
Jakub Beránek
59d5328e0a Fix source code path in comment 2025-01-01 17:06:27 +01:00
Stuart Cook
cf7d7f5096
Rollup merge of #134950 - Zalathar:tool-check-step, r=jieyouxu
bootstrap: Overhaul and simplify the `tool_check_step!` macro

Main changes:

- Pull most of `run` out of the macro and into a regular helper function
- Reduce the number of redundant/unnecessary macro arguments
- Switch to struct-like syntax so that optional arguments are clearer, and so that rustfmt is happy

~~The one “functional” change is that the `-check.stamp` files now get their name from the final path segment, instead of the struct name; in practice this means that they now contain more hyphens in some cases. As far as I'm aware, the exact filename doesn't matter so this should be fine.~~ (that change has been removed from this PR)
2025-01-01 16:35:31 +11:00
onur-ozkan
6eb9ebf1d6 add test coverage for helpers::is_path_in_submodule
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-31 16:34:21 +03:00
onur-ozkan
b1b576da4d handle submodules automatically on doc steps
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-31 16:24:58 +03:00
Zalathar
66fd5340ea Use struct-like syntax in tool_check_step!
This tricks rustfmt into formatting the macro arguments as expressions, instead
of giving up and ignoring them.
2024-12-31 22:26:14 +11:00
Zalathar
774e83cea1 Make tool_check_step! always assume SourceType::InTree
All of the tools that use this macro are currently in-tree, so support for
specifying a `SourceType` was not meaningfully used. It can potentially be
re-added in the future if needed.
2024-12-31 22:12:59 +11:00
Zalathar
c59ccae739 Infer tool-check-step display name from the last path component 2024-12-31 22:12:59 +11:00
Zalathar
1afeeef77d Move most of the Step::run impl out of tool_check_step!
Ordinary code is much easier to work with than macro-generated code.
2024-12-31 22:12:59 +11:00
Stuart Cook
a777f4a793
Rollup merge of #134919 - Zalathar:x-test-compiler, r=jieyouxu
bootstrap: Make `./x test compiler` actually run the compiler unit tests

Fixes #134916.
2024-12-31 14:12:45 +11:00
Zalathar
796835f376 Make ./x test compiler actually run the compiler unit tests 2024-12-31 10:52:33 +11:00
Matthias Krüger
4b9e3daa0b
Rollup merge of #134911 - HigherOrderLogic:master, r=onur-ozkan
chore: fix typos

This PR fixes typos errors in docstring only, so functionality wise, it should stay the same.
2024-12-30 19:34:56 +01:00
Horu
4c279fb7af chore: fix typos 2024-12-30 14:56:21 +07:00
bors
c1566141b6 Auto merge of #134865 - clubby789:proc-macro-tls, r=onur-ozkan
bootstrap: Don't apply -Ztls-model=initial-exec to deps of proc-macros

Fixes #134863

1. Checks if a crate name is in a static list before applying the flag
2. Adds a tidy check that gathers transitive deps of proc macros and ensures the list is up to date

cc `@bjorn3` - the issue specifies `rustc_fluent_macro` but I assume this applies to all proc macro crates.
2024-12-30 07:26:13 +00:00
clubby789
f0734626cd bootstrap: Don't apply -Ztls-model=initial-exec to deps of proc-macros 2024-12-29 21:48:06 +00:00
clubby789
f4d215ea91 Add tidy check for list of proc-macro crate transitive dependencies 2024-12-29 21:48:03 +00:00
bors
64feb9b502 Auto merge of #134887 - Zalathar:rollup-ghpz7oy, r=Zalathar
Rollup of 5 pull requests

Successful merges:

 - #134799 (nits: Cleanups in `librustdoc::clean`)
 - #134851 (docs: inline `alloc::ffi::c_str` types to `alloc::ffi`)
 - #134869 (Bump compiler cc)
 - #134876 (bootstrap: Consolidate the macros for declaring compiletest test suites)
 - #134883 (bootstrap: Fix `./x check bootstrap` by moving `shared_helpers::tests`)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-12-29 12:43:22 +00:00
Stuart Cook
fc89cb202f
Rollup merge of #134883 - Zalathar:shared-helpers, r=clubby789
bootstrap: Fix `./x check bootstrap` by moving `shared_helpers::tests`

Running `./x check bootstrap` currently doesn't work, because it builds the bootstrap shim binaries with `cfg(test)`, and those binaries can't find a `tests` submodule when they include `shared_helpers.rs` via `#[path]`.

This PR fixes that by taking the tests module and moving it to `super::tests::shared_helpers_tests` instead.

(The extra `tests` submodule prevents tidy from complaining about unit tests that aren't in a dedicated tests module.)

---

It would be nice to also run `./x check bootstrap compiletest` in CI, so that this and #134848 don't regress, but I didn't want to bundle that change with this fix.
2024-12-29 22:45:39 +11:00
bors
e7738afb70 Auto merge of #134650 - onur-ozkan:clean-up-fixmes, r=Kobzol
Clean up some FIXME notes on bootstrap

Fixing and removing some FIXME notes.
2024-12-29 10:04:55 +00:00
Zalathar
4192293b4d Fix ./x check bootstrap by moving shared_helpers::tests 2024-12-29 20:49:03 +11:00
Zalathar
1e37bbe2de Allow macro-declared test steps to have docstrings and attributes 2024-12-29 15:50:47 +11:00
Zalathar
7b7f634cac Consolidate the macros for declaring compiletest suites 2024-12-29 15:50:47 +11:00
bors
b76036c88c Auto merge of #134848 - Zalathar:check-compiletest, r=jieyouxu
bootstrap: Allow `./x check compiletest`

Did you know that bootstrap didn't support `./x check compiletest`? Well, now it does!

Manually add `"compiletest"` to your `rust-analyzer.check.overrideCommand` check command to get error/warning integration when modifying compiletest.
2024-12-28 22:00:11 +00:00
bors
8742e0556d Auto merge of #134845 - jieyouxu:temp-drop-warning, r=onur-ozkan
bootstrap: drop warning for top-level test suite path check due to false positives

The current top-level test suite directory does not exist warning logic doesn't quite handle the more exotic path suffix matches that test filters seem to accept (e.g. `library/test` can be matched with `--exclude test`), so avoid warning on non-existent top-level test suites for now. To avoid false positives, we probably need to query test `Step`s for their `should_run(exclude_filter)` logic.

This retains the fix for the Windows path handling (unlike #134843).

r? `@onur-ozkan`
2024-12-28 19:20:22 +00:00
bors
ceb0441e82 Auto merge of #134790 - onur-ozkan:cfg-test, r=clubby789
replace bootstrap-self-test feature flag with cfg(test)

This makes it in more rusty way.
2024-12-28 16:37:13 +00:00
Zalathar
c1c2d85cc9 bootstrap: Allow ./x check compiletest 2024-12-28 23:23:41 +11:00
许杰友 Jieyou Xu (Joe)
c393811a48 bootstrap: drop warning for top-level test suite path check
This doesn't quite handle the more exotic path suffix matches that test
filters seem to accept (e.g. `library/test` can be matched with
`--exclude test`), so avoid warning on non-existent top-level test
suites for now. A proper fix will need to possibly query test `Step`s
for their exclude logic.
2024-12-28 17:55:05 +08:00
onur-ozkan
eedafbc92f remove deprecated option parallel-compiler
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-28 11:35:29 +03:00
onur-ozkan
47cd3e7c61 read to String directly without extra conversion
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-28 11:34:00 +03:00
onur-ozkan
ec9502d803 remove an invalid FIXME note
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-12-28 11:33:57 +03:00
bors
dd84b7d5ee Auto merge of #134830 - matthiaskrgr:rollup-7hdjojz, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #133663 (Add a compiler intrinsic to back `bigint_helper_methods`)
 - #134798 (Make `ty::Error` implement all auto traits)
 - #134808 (compiletest: Remove empty 'expected' files when blessing)
 - #134809 (Add `--no-capture`/`--nocapture` as bootstrap arguments)
 - #134826 (Add spastorino to users_on_vacation)
 - #134828 (Add clubby789 back to bootstrap review rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-12-27 19:30:32 +00:00
clubby789
35bbb01ea9 Add change tracker entry 2024-12-27 12:24:03 +00:00
clubby789
bccc11e230 compiletest: Replace --nocapture with --no-capture 2024-12-27 12:10:55 +00:00
clubby789
4fd3baaf70 Add --no-capture as a bootstrap argument 2024-12-27 11:52:01 +00:00
clubby789
e5f676521c Strip debuginfo from rustc-main and rustdoc 2024-12-26 22:34:09 +00:00