about summary refs log tree commit diff
path: root/src/etc
AgeCommit message (Collapse)AuthorLines
2024-12-08Auto merge of #133134 - Walnut356:synth_prov, r=Mark-Simulacrumbors-1/+22
Don't use a SyntheticProvider for literally every type Replaces a glob regex with individualized imports for each standard library type. This improves debugger performance by quite a bit when populating lots of values with lots of fields With the glob, afaik every single value of every single type that the debugger renders is run through a python function that does quite a few string comparisons (i plan to fix those next) to determine the SyntheticProvider to use. It looks like DefaultSyntheticProvider's functions internally call the liblldb c++ functions, which ends up with identical behavior to not using a SyntheticProvider at all, except you have extra python round trips slowing things down. These sample vidoes were run on x86-64-pc-windows-gnu. `vect` is a 1000 element `Vec<Big>`, `Big` contains a dozen or so `Small`, and `Small` contains a dozen or so `[i32; 5]` Before: https://github.com/user-attachments/assets/07c31fe7-e126-4c2e-8ae9-cfe36e351d3f After: https://github.com/user-attachments/assets/6c0d1a45-1ffe-46de-95a0-5dbe59a173b5 --- try-job: aarch64-apple
2024-12-04Reformat Python code with `ruff`Jakub Beránek-251/+426
2024-12-01rust_analyzer_settings: force use of 'nightly' toolchainRalf Jung-0/+3
2024-11-29add explicit synthetic lookup for tuplesWalnut-0/+1
2024-11-28force expanded formatting for non-synthetic typesWalnut-0/+1
2024-11-25Rollup merge of #132803 - wangjingcun:master, r=Mark-SimulacrumMatthias Krüger-1/+1
Fix broken url
2024-11-17restrict synthetic types to standard library typesWalnut-1/+20
2024-11-13Bump bootstrap depsclubby789-230/+230
2024-11-11Fix broken urlwangjingcun-1/+1
Signed-off-by: wangjingcun <wangjingcun@aliyun.com>
2024-11-09Use a separate dir for r-a builds consistently in helix configMaybe Lapkin-2/+15
2024-11-02Rollup merge of #132333 - tshepang:patch-4, r=workingjubileeMatthias Krüger-3/+4
rust_analyzer_helix.toml: add library/ manifest
2024-11-01Remove unncessary option for default rust-analyzer settingyukang-2/+0
2024-10-29rust_analyzer_helix.toml: add library/ manifestTshepang Mbambo-3/+4
Also, sort list
2024-10-29Rename `command-list.rs` to `directive-list.rs`Zalathar-1/+1
2024-10-27remove dead code in CGREP scriptjyn-1/+0
2024-10-20Rollup merge of #131365 - heiseish:fix-issue-101993, r=Mark-SimulacrumMatthias Krüger-1/+40
Fix missing rustfmt in msi installer #101993 # Context - Fixed missing `rustfmt`, `clippy`, `miri` and `rust-analyzer` in msi installer - Fixed missing `rustfmt` for apple darwin installer - Closes #101993 r​? `@jyn514` - Please let me know if I should request from someone else instead. I divided the changes into 3 separate commits for the ease of review. The refactoring commit `fbdfd5c03c3c979bcf105ccdd05ff4ab9f37a763` is a bit more involved, but I think it helps in the long term for readability and to avoid bugs. - I changed `build-manifest` to `build_manifest` in order to invoke it as a library. Not sure if this is gonna break any upstream processes. I checked `generate-manifest-list` and `generate-release` but didn't find any obvious reference - Will push fixes for linting later
2024-10-15fix missing rustfmt and clippy for msiGiang Dao-1/+40
2024-10-11rename RcBox in other places tooJonathan Dönszelmann-3/+3
2024-10-03bootstrap: Consolidate editor LSP setupKajetan Puchalski-1/+1
Consolidate LSP setup for different editors into one `./x setup editor`.
2024-10-01bootstrap: Add support for ./x setup vimKajetan Puchalski-1/+1
2024-10-01bootstrap: Add support for ./x setup helixKajetan Puchalski-1/+1
2024-10-01bootstrap: Add support for ./x setup emacsKajetan Puchalski-26/+26
Add support for automatically setting up the recommended LSP config for Emacs. Additionally, refactor setup.rs to make it easier to add support for more editors in the future.
2024-09-27Rollup merge of #130932 - mrkajetanp:editors, r=jieyouxuMatthias Krüger-0/+78
etc: Add sample rust-analyzer configs for eglot & helix LSP configuration in editors like Emacs (eglot) and helix does not use the same JSON format as vscode and vim do. It is not obvious how to set up LSP for rustc in those editors and the dev guide currently does not cover them. Adding sample configuration files for those editors alongside the currently existing JSON one would be helpful. I figured having those included in the repo like the JSON one might save someone some time and frustration otherwise spent on trying to get the more niche editors' LSP to work properly. I'll add a section in the dev guide too.
2024-09-27etc: Add rust-analyzer configs for eglot & helixKajetan Puchalski-0/+78
LSP configuration in editors like Emacs (eglot) and helix does not use the same JSON format as vscode and vim do. It is not obvious how to set up LSP for rustc in those editors and the dev guide currently does not cover them. Adding sample configuration files for those editors alongside the currently existing JSON one would be helpful.
2024-09-27Rollup merge of #130517 - bjorn3:update_ra_config, r=onur-ozkanGuillaume Gomez-0/+1
Add the library workspace to the suggested rust-analyzer config
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-6/+6
2024-09-18Add the library workspace to the suggested rust-analyzer configbjorn3-0/+1
2024-09-07Remove unused option from x.pyGurinder Singh-145/+19
2024-08-18Generate completions after version updatesTrevor Gross-1471/+2988
Running `cargo update` changed completion output. Regenerate them here.
2024-08-12regenerate `./x` completionsRémy Rakic-13/+6
to pick up changes to `./x miri` and `./x test` commands
2024-08-12clarify that `--rustc-args` is for compiletest testsRémy Rakic-3/+3
2024-08-11Fix debuginfo providers/testsBen Kimock-16/+16
2024-08-09Polymorphize RawVecBen Kimock-5/+12
2024-07-20Rewrite `test-float-parse` in RustTrevor Gross-554/+2337
The existing implementation uses Python to launch a set of Rust-written binaries. Unfortunately, this is currently broken; it seems that some updates meant it no longer compiles. There is also a problem that support for more float types (`f16`, `f128`) would be difficult to add since this is very specialized to `f32` and `f64`. Because of these sortcomings, migrate to a version written in Rust. This version should be significantly faster; test generators can execute in parallel, and test cases are chunked and parallelized. This should also resolve the preexisting "... the worker processes are leaked and stick around forever" comment. This change also introduces genericism over float types and properties, meaning it will be much easier to extend support to newly added types. `num::BigRational` is used in place of Python's fractions for infinite-precision calculations.
2024-07-19Update jsondocck directives to follow ui_test-styleLeón Orell Valerian Liehr-0/+1
2024-07-09Auto merge of #127001 - beetrees:f16-debuginfo, r=michaelwoeristerbors-0/+26
Add Natvis visualiser and debuginfo tests for `f16` To render `f16`s in debuggers on MSVC targets, this PR changes the compiler to output `f16`s as `struct f16 { bits: u16 }`, and includes a Natvis visualiser that manually converts the `f16`'s bits to a `float` which is can then be displayed by debuggers. `gdb`, `lldb` and `cdb` tests are also included for `f16` . `f16`/`f128` MSVC debug info issue: #121837 Tracking issue: #116909
2024-07-09Add Natvis visualiser and debuginfo tests for `f16`beetrees-0/+26
2024-06-27Implement `x perf` as a separate toolJakub Beránek-3/+3
2024-06-24Allow numbers in rustdoc tests commandsGuillaume Gomez-1/+1
2024-06-24Remove commands duplication between `compiletest` and `tests/rustdoc`Guillaume Gomez-225/+28
2024-06-24Move `tests/rustdoc` testsuite to `//@` syntaxGuillaume Gomez-32/+249
2024-06-23Rollup merge of #126663 - onur-ozkan:gitdir-thing, r=Mark-SimulacrumMatthias Krüger-2/+0
remove `GIT_DIR` handling in pre-push hook This is already handled from bootstrap: https://github.com/rust-lang/rust/blob/a1ca449981e3b8442e358026437b7bedb9a1458e/src/bootstrap/src/utils/helpers.rs#L504-L506
2024-06-19remove `GIT_DIR` handling in pre-push hookonur-ozkan-2/+0
This is already handled from bootstrap at https://github.com/rust-lang/rust/blob/a1ca449981e3b8442e358026437b7bedb9a1458e/src/bootstrap/src/utils/helpers.rs#L504-L506. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2024-06-12Add `x perf` command for profiling the compiler using `rustc-perf`Jakub Beránek-1/+240
2024-05-29Remove path choice from `x fmt` and add `--all` option.Nicholas Nethercote-1/+4
By default, `x fmt` formats/checks modified files. But it also lets you choose one or more paths instead. This adds significant complexity to `x fmt`. Explicit paths are specified via `WalkBuilder::add` rather than `OverrideBuilder::add`. The `ignore` library is not simple, and predicting the interactions between the two mechanisms is difficult. Here's a particularly interesting case. - You can request a path P that is excluded by the `ignore` list in the `rustfmt.toml`. E.g. `x fmt tests/ui/` or `x fmt tests/ui/bitwise.rs`. - `x fmt` will add P to the walker (via `WalkBuilder::add`), traverse it (paying no attention to the `ignore` list from the `rustfmt.toml` file, due to the different mechanism), and call `rustfmt` on every `.rs` file within it. - `rustfmt` will do nothing to those `.rs` files, because it *also* reads `rustfmt.toml` and sees that they match the `ignore` list! It took me *ages* to debug and understand this behaviour. Not good! `x fmt` even lets you name a path below the current directory. This was intended to let you do things like `x fmt std` that mirror things like `x test std`. This works by looking for `std` and finding `library/std`, and then formatting that. Unfortuantely, this motivating case now gives an error. When support was added in #107944, `library/std` was the only directory named `std`. Since then, `tests/ui/std` was added, and so `x fmt std` now gives an error. In general, explicit paths don't seem particularly useful. The only two cases `x fmt` really needs are: - format/check the files I have modified (99% of uses) - format/check all files (While respecting the `ignore` list in `rustfmt.toml`, of course.) So this commit moves to that model. `x fmt` will now give an error if given an explicit path. `x fmt` now also supports a `--all` option. (And running with `GITHUB_ACTIONS=true` also causes everything to be formatted/checked, as before.) Much simpler!
2024-05-11lldb-formatters: Use StdSliceSyntheticProvider for &strVladimir Makayev-1/+4
2024-05-05Implement lldb formattter for "clang encoded" enums (LLDB 18.1+)Vladimir Makayev-2/+60
Summary: I landed a fix last year to enable `DW_TAG_variant_part` encoding in LLDBs (https://reviews.llvm.org/D149213). This PR is a corresponding fix in synthetic formatters to decode that information. This is in no way perfect implementation but at least it improves the status quo. But most types of enums will be visible and debuggable in some way. I've also updated most of the existing tests that touch enums and re-enabled test cases based on LLDB for enums. Test Plan: ran tests `./x test tests/debuginfo/`. Also tested manually in LLDB CLI and LLDB VSCode Other Thoughs A better approach would probably be adopting [formatters from codelldb](https://github.com/vadimcn/codelldb/blob/master/formatters/rust.py). There is some neat hack that hooks up summary provider via synthetic provider which can ultimately fix more display issues for Rust types and enums too. But getting it to work well might take more time that I have right now.
2024-04-22introduce `x vendor`onur-ozkan-1/+250
Signed-off-by: onur-ozkan <work@onurozkan.dev>
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