about summary refs log tree commit diff
path: root/src/etc
AgeCommit message (Collapse)AuthorLines
2024-04-05Auto merge of #123317 - RalfJung:test-in-miri, r=m-ou-se,saethlin,onur-ozkanbors-1/+263
Support running library tests in Miri This adds a new bootstrap subcommand `./x.py miri` which can test libraries in Miri. This is in preparation for eventually doing that as part of bors CI, but this PR only adds the infrastructure, and doesn't enable it yet. `@rust-lang/bootstrap` should this be `x.py test --miri library/core` or `x.py miri library/core`? The flag has the advantage that we don't have to copy all the arguments from `Subcommand::Test`. It has the disadvantage that most test steps just ignore `--miri` and still run tests the regular way. For clippy you went the route of making it a separate subcommand. ~~I went with a flag now as that seemed easier, but I can change this.~~ I made it a new subcommand. Note however that the regular cargo invocation would be `cargo miri test ...`, so `x.py` is still going to be different in that the `test` is omitted. That said, we could also make it `./x.py miri-test` to make that difference smaller -- that's in fact more consistent with the internal name of the command when bootstrap invokes cargo. `@rust-lang/libs` ~~unfortunately this PR does some unholy things to the `lib.rs` files of our library crates.~~ `@m-ou-se` found a way that entirely avoids library-level hacks, except for some new small `lib.miri.rs` files that hopefully you will never have to touch. There's a new hack in cargo-miri but there it is in good company...
2024-04-03add 'x.py miri', and make it work for 'library/{core,alloc,std}'Ralf Jung-1/+263
2024-04-02x.py test: remove no-op --skip flagRalf Jung-8/+8
2024-03-29Add rust-lldb pretty printing for Path and PathBufNathan Henrie-0/+43
Fixes https://github.com/rust-lang/rust/issues/120553 Fixes https://github.com/rust-lang/rust/issues/48462
2024-03-17Auto merge of #121885 - reitermarkus:generic-nonzero-inner, ↵bors-22/+37
r=oli-obk,wesleywiser Move generic `NonZero` `rustc_layout_scalar_valid_range_start` attribute to inner type. Tracking issue: https://github.com/rust-lang/rust/issues/120257 r? `@dtolnay`
2024-03-14Fix `StdNonZeroNumberProvider` for `gdb`.Markus Reiter-1/+8
2024-03-14Add comment about `NonZero` printing as character literal.Markus Reiter-0/+2
2024-03-14Fix `StdNonZeroNumberSummaryProvider`.Markus Reiter-20/+23
2024-03-14Try fixing `debuginfo` test.Markus Reiter-3/+6
2024-03-11Remove old support for emscripten/wasm32-u-uAlex Crichton-24/+0
This commit removes the `wasm32-shim.js` file, for example, and deletes old support for Emscripten which hasn't been exercised in some time.
2024-01-27Update tests.Markus Reiter-34/+1
2024-01-26Rollup merge of #119562 - LegionMammal978:rename-pin-pointer, r=Amanieu,dtolnayMatthias Krüger-2/+2
Rename `pointer` field on `Pin` A few days ago, I was helping another user create a self-referential type using `PhantomPinned`. However, I noticed an odd behavior when I tried to access one of the type's fields via `Pin`'s `Deref` impl: ```rust use std::{marker::PhantomPinned, ptr}; struct Pinned { data: i32, pointer: *const i32, _pin: PhantomPinned, } fn main() { let mut b = Box::pin(Pinned { data: 42, pointer: ptr::null(), _pin: PhantomPinned, }); { let pinned = unsafe { b.as_mut().get_unchecked_mut() }; pinned.pointer = &pinned.data; } println!("{}", unsafe { *b.pointer }); } ``` ```rust error[E0658]: use of unstable library feature 'unsafe_pin_internals' --> <source>:19:30 | 19 | println!("{}", unsafe { *b.pointer }); | ^^^^^^^^^ error[E0277]: `Pinned` doesn't implement `std::fmt::Display` --> <source>:19:20 | 19 | println!("{}", unsafe { *b.pointer }); | ^^^^^^^^^^^^^^^^^^^^^ `Pinned` cannot be formatted with the default formatter | = help: the trait `std::fmt::Display` is not implemented for `Pinned` = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info) ``` Since the user named their field `pointer`, it conflicts with the `pointer` field on `Pin`, which is public but unstable since Rust 1.60.0 with #93176. On versions from 1.33.0 to 1.59.0, where the field on `Pin` is private, this program compiles and prints `42` as expected. To avoid this confusing behavior, this PR renames `pointer` to `__pointer`, so that it's less likely to conflict with a `pointer` field on the underlying type, as accessed through the `Deref` impl. This is technically a breaking change for anyone who names their field `__pointer` on the inner type; if this is undesirable, it could be renamed to something more longwinded. It's also a nightly breaking change for any external users of `unsafe_pin_internals`.
2024-01-19Increase vscode `git.detectSubmodulesLimit`trevyn-0/+1
2024-01-16Rename `pointer` field on `Pin`LegionMammal978-2/+2
The internal, unstable field of `Pin` can conflict with fields from the inner type accessed via the `Deref` impl. Rename it from `pointer` to `__pointer`, to make it less likely to conflict with anything else.
2024-01-11Auto merge of #119654 - onur-ozkan:bump-dependencies, r=clubby789bors-1/+5
bump bootstrap dependencies This PR removes hard-coded patch versions, updates bootstrap's dependency stack to recent versions (some of the versions were released 3-4 years ago), and removes a few dependencies from bootstrap. Removed dependencies: ![image](https://github.com/rust-lang/rust/assets/39852038/95e86325-aea0-4055-bee5-245c144f662e)
2024-01-11bless tidyonur-ozkan-1/+5
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-01-01pass allow-{dirty,staged} to clippyonur-ozkan-1/+7
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-12-20Auto merge of #106790 - the8472:rawvec-niche, r=scottmcmbors-7/+15
add more niches to rawvec Previously RawVec only had a single niche in its `NonNull` pointer. With this change it now has `isize::MAX` niches since half the value-space of the capacity field is never needed, we can't have a capacity larger than isize::MAX.
2023-12-19update natvis to match changed RawVec structureThe 8472-4/+4
2023-12-11update debug providers to match new RawVec capacity fieldThe 8472-3/+11
2023-12-11update auto completionsonur-ozkan-15/+60
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-12-09allow bypassing the build directory lockonur-ozkan-40/+85
As bootstrap locks its entire build directory, parallel bootstrapping for anything becomes impossible. This change enables developers to bypass the locking mechanism when it is unnecessary for their specific use case. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-11-04Auto merge of #115274 - bjorn3:tidy_improvements, r=davidtwcobors-1/+76
Run tidy license checker on more workspaces The license checker didn't run on several workspaces before this PR. The same applied to the "external package sources" check. There were also two missing lockfiles which I have added now.
2023-10-29Rollup merge of #117043 - onur-ozkan:skip-stage0-validation, r=Mark-SimulacrumGuillaume Gomez-15/+60
add bootstrap flag `--skip-stage0-validation` This change introduces the `--skip-stage0-validation` flag, which permits the use of any desired version of the stage0 compiler without verifying its version. Additionally, stage0 compiler validation check is reverted(#115103) to its default enabled state. Helps to #115065 r? Mark-Simulacrum
2023-10-23Rollup merge of #116978 - tromey:rust-printers-cleanup, r=Mark-SimulacrumMatthias Krüger-55/+78
Rewrite gdb pretty-printer registration Currently, the Rust pretty-printers are registered in gdb using the uninformative name "lookup": (gdb) info pretty-printer global pretty-printers: [...] objfile /home/tromey/[...] lookup It's nicer for users if the top-level registration is given a clear name. Additionally, gdb lets users individually enable and disable specific printers, provided they are registered correctly. This patch implements both these ideas. Now the output looks like: (gdb) info pretty-printer global pretty-printers: [...] objfile /home/tromey/[...] rust StdArc StdBTreeMap StdBTreeSet StdCell StdHashMap StdHashSet StdNonZeroNumber StdOsString StdRc StdRef StdRefCell StdRefMut StdSlice StdStr StdString StdVec StdVecDeque
2023-10-22add bootstrap flag `--skip-stage0-validation`onur-ozkan-15/+60
This change introduces the --skip-stage0-validation flag, which permits the use of any desired version of the stage0 compiler without verifying its version. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-20Use gdb.ValuePrinter tag classTom Tromey-149/+158
GDB 14 has a "gdb.ValuePrinter" tag class that was introduced to let GDB evolve the pretty-printer API. Users of this tag are required to hide any local attributes or methods. This patch makes this change to the Rust pretty-printers. At present this is just a cleanup, providing the basis for any future changes.
2023-10-20Rewrite gdb pretty-printer registrationTom Tromey-55/+78
Currently, the Rust pretty-printers are registered in gdb using the uninformative name "lookup": (gdb) info pretty-printer global pretty-printers: [...] objfile /home/tromey/[...] lookup It's nicer for users if the top-level registration is given a clear name. Additionally, gdb lets users individually enable and disable specific printers, provided they are registered correctly. This patch implements both these ideas. Now the output looks like: (gdb) info pretty-printer global pretty-printers: [...] objfile /home/tromey/[...] rust StdArc StdBTreeMap StdBTreeSet StdCell StdHashMap StdHashSet StdNonZeroNumber StdOsString StdRc StdRef StdRefCell StdRefMut StdSlice StdStr StdString StdVec StdVecDeque
2023-10-15generate zsh autocompletion for xonur-ozkan-0/+751
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-15bump bootstrap:clap_complete to `4.4.3`onur-ozkan-50/+50
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-10Add two lockfilesbjorn3-0/+75
2023-10-10Update rand dependency for test-float-parsebjorn3-1/+1
This removes a dependency on fuchsia-cprng which doesn't have any license info.
2023-10-09Add `--enable-bolt-settings` bootstrap flagJakub Beránek-15/+45
2023-09-24Auto merge of #104385 - BlackHoleFox:apple-minimum-bumps, r=petrochenkovbors-1/+1
Raise minimum supported Apple OS versions This implements the proposal to raise the minimum supported Apple OS versions as laid out in the now-completed MCP (https://github.com/rust-lang/compiler-team/issues/556). As of this PR, rustc and the stdlib now support these versions as the baseline: - macOS: 10.12 Sierra - iOS: 10 - tvOS: 10 - watchOS: 5 (Unchanged) In addition to everything this breaks indirectly, these changes also erase the `armv7-apple-ios` target (currently tier 3) because the oldest supported iOS device now uses ARMv7s. Not sure what the policy around tier3 target removal is but shimming it is not an option due to the linker refusing. [Per comment](https://github.com/rust-lang/compiler-team/issues/556#issuecomment-1297175073), this requires a FCP to merge. cc `@wesleywiser.`
2023-09-23Raise minimum supported macOS to 10.12BlackHoleFox-1/+1
2023-09-14update rust_analyzer_settings.jsonRalf Jung-2/+2
2023-08-22rust-gdbgui: remove excessive quotesEren K-3/+3
in commit 8dd0ec6, the `GDB_ARGS` variable was split across 3 lines. However, extra quotes were added to each line, such that the shell interprets the 3 lines as space separated strings, and tries to execute the latter two lines. This commit simply removes the extra quotes.
2023-08-10Auto merge of #112482 - tgross35:ci-non-rust-linters, r=pietroalbinibors-1/+7
Add support for tidy linting via external tools for non-rust files This change adds the flag `--check-extras` to `tidy`. It accepts a comma separated list of any of the options: * py (test everything applicable for python files) * py:lint (lint python files using `ruff`) * py:fmt (check formatting for python files using `black`) * shell or shell:lint (lint shell files using `shellcheck`) Specific files to check can also be specified via positional args. Examples: * `./x test tidy --check-extras=shell,py` * `./x test tidy --check-extras=py:fmt -- src/bootstrap/bootstrap.py` * `./x test tidy --check-extras=shell -- src/ci/*.sh` * Python formatting can be applied with bless: `./x test tidy --ckeck-extras=py:fmt --bless` `ruff` and `black` need to be installed via pip; this tool manages these within a virtual environment at `build/venv`. `shellcheck` needs to be installed on the system already. --- This PR doesn't fix any of the errors that show up (I will likely go through those at some point) and it doesn't enforce anything new in CI. Relevant zulip discussion: https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/Other.20linters.20in.20CI
2023-08-06fix(bootstrap): rename exclude flag to skip 🐛Meysam Azad-15/+99
2023-08-02Add support for tidy linting via external tools for non-rust filesTrevor Gross-1/+7
This change adds the flag `--check-extras` to `tidy`. It accepts a comma separated list of any of the options: - py (test everything applicable for python files) - py:lint (lint python files using `ruff`) - py:fmt (check formatting for python files using `black`) - shell or shell:lint (lint shell files using `shellcheck`) Specific files to check can also be specified via positional args. Examples: - `./x test tidy --check-extras=shell,py` - `./x test tidy --check-extras=py:fmt -- src/bootstrap/bootstrap.py` - `./x test tidy --check-extras=shell -- src/ci/*.sh` - Python formatting can be applied with bless: `./x test tidy --ckeck-extras=py:fmt --bless` `ruff` and `black` need to be installed via pip; this tool manages these within a virtual environment at `build/venv`. `shellcheck` needs to be installed on the system already.
2023-07-31Rollup merge of #113906 - notriddle:notriddle/cargo-extra-env, r=Mark-SimulacrumMatthias Krüger-1/+4
etc: add `RUSTC_BOOTSTRAP` to rust-analyzer config Fixes the problem reported in https://github.com/rust-lang/rust/issues/112391#issuecomment-1597224941
2023-07-31Remove BOLT from bootstrapJakub Beránek-90/+60
2023-07-30support `--stage` for `x clean`ozkanonur-9/+9
Signed-off-by: ozkanonur <work@onurozkan.dev>
2023-07-20etc: add `RUSTC_BOOTSTRAP` to rust-analyzer configMichael Howell-1/+4
Fixes the problem reported in https://github.com/rust-lang/rust/issues/112391#issuecomment-1597224941
2023-07-19Improve htmldocck error a bit by providing line where error occurredGuillaume Gomez-0/+2
2023-07-17Auto merge of #89132 - Cyborus04:rc_allocator_support, r=Amanieubors-5/+8
Add support for allocators in `Rc` & `Arc` Adds the ability for `std::rc:Rc`, `std::rc::Weak`, `std::sync::Arc`, and `std::sync::Weak` to live in custom allocators
2023-07-17Update natvis to match full type names for Arc, Rc, Weak, etcWesley Wiser-5/+8
Also update a test case to have the correct whitespace in a type name.
2023-06-30User may want to skip tidy check sometimesyukang-1/+5
2023-06-24Rollup merge of #112915 - preveen-stack:patch-1, r=Mark-SimulacrumGuillaume Gomez-1/+1
Update runtests.py : grammar correction - Grammatically corrected the sentence
2023-06-23Add @files commandGuillaume Gomez-3/+51