Commit graph

737 commits

Author SHA1 Message Date
Lukas Wirth
23712aea06 cargo upgrade 2025-06-13 10:08:20 +02:00
Lukas Wirth
62bacfc37b fix: Fix manual not containing diagnostics documentation 2025-05-31 14:36:29 +02:00
Laurențiu Nicola
9e86544698 Merge from rust-lang/rust 2025-05-20 10:01:00 +03:00
Laurențiu Nicola
f3b5221cfc Bump zip to 3.0 2025-05-16 11:51:58 +02:00
Stuart Cook
9f4e2cc51d
Rollup merge of #140035 - fee1-dead-contrib:push-oszwkkvmpkks, r=jieyouxu,wesleywiser
Implement RFC 3503: frontmatters

Tracking issue: #136889

Supercedes #137193. This implements [RFC 3503](https://github.com/rust-lang/rfcs/blob/master/text/3503-frontmatter.md).

This might break rust-analyzer. Will look into how to fix that.

Suggestions welcome for how to improve diagnostics.
2025-05-06 16:28:39 +10:00
Deadbeef
9fce1dfac5 Implement RFC 3503: frontmatters
Supercedes #137193
2025-05-05 23:10:08 +08:00
Lukas Wirth
9fa647c129 Update salsa 2025-04-29 19:26:19 +02:00
Lukas Wirth
9f5b8844bd
Merge pull request #19685 from fbernier/pgo-install
Add PGO support to install
2025-04-29 09:46:09 +00:00
Lukas Wirth
7e526b6be7 Add expression fill mode variant for filling with underscore expressions 2025-04-28 10:39:36 +02:00
François Bernier
e2c48d3c45 Add PGO support to install
Enable PGO optimizations when installing rust-analyzer with the
--pgo flag. This mirrors functionality already available in dist
command, allowing developers to create optimized local builds.

Example:
cargo xtask install --server --pgo clap-rs/clap

PGO code has been extracted to a dedicated module for reuse.
2025-04-25 00:33:09 -04:00
Laurențiu Nicola
0ba49a3777 Support specific revisions for pgo 2025-04-18 12:58:52 +03:00
Jakub Beránek
e12d15d119
Use -q to silence RA output 2025-04-15 12:46:56 +02:00
Jakub Beránek
813ea83e5f
Allow passing a specific crate for PGO training 2025-04-15 11:25:16 +02:00
Jakub Beránek
136bf7f734
Fix llvm-profdata extension on non Linux OSes 2025-04-15 11:19:37 +02:00
Jakub Beránek
43449a88bc Add xdist dist --pgo command to build Rust Analyzer with PGO optimizations 2025-04-14 11:51:48 +02:00
Lukas Wirth
dc363f7f77
Merge pull request #19462 from Veykril/push-ypvprvvwkyll
refactor: Lower type-refs before type inference
2025-04-09 08:54:28 +00:00
Lukas Wirth
1fd9520c92 refactor: Lower type-refs before type inference
This refactors how we deal with items in hir-def lowering.

- It now lowers all of them through an "ExpressionStore" (kind of a misnomer as this point) as their so called *Signatures.
- We now uniformly lower type AST into TypeRefs before type inference.
- Likewise, this moves macro expansion out of type inference, resulting in a single place where we do non-defmap macro expansion.
- Finally, this PR removes a lot of information from ItemTree, making the DefMap a lot less likely to be recomputed and have it only depend on actual early name resolution related information (not 100% true, we still have ADT fields in there but thats a follow up removal).
2025-04-09 10:43:23 +02:00
Lukas Wirth
33c3f67764
Merge pull request #19511 from snprajwal/fixmes
chore: clean up some FIXMEs
2025-04-07 10:30:46 +00:00
BenjaminBrienen
2462624a7d prefer default over new 2025-04-04 15:49:50 +02:00
Prajwal S N
72c7cd3869
chore: clean up some FIXMEs
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-04-04 17:40:56 +05:30
Lukas Wirth
7a1e9c4b0c ci: Require miri step 2025-03-25 08:10:27 +01:00
Laurențiu Nicola
1259cc52c6 Use zip/deflate-flate2 to avoid BSL-1.0 dep 2025-03-23 13:56:55 +02:00
Lukas Wirth
500ea05aef chore: Bump dependencies 2025-03-23 08:46:10 +01:00
Lukas Wirth
d31301cbe7 refactor: Reduce codegen burden for SyntaxNode and SyntaxToken 2025-03-21 12:14:39 +01:00
Lukas Wirth
d6dc1bf05e refactor: Reduce codegen burden for SyntaxKind 2025-03-21 12:14:39 +01:00
Prajwal S N
1f366e7efe
fix(codegen): do not generate docs with --check
Running `cargo codegen --check` should not generate any mdbook files,
since they are ignored in the repo and used only while releasing a new
copy of the documentation.

Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
2025-03-17 14:40:24 +05:30
BenjaminBrienen
1293a5a186 cargo xtask tidy 2025-03-15 21:32:01 +01:00
BenjaminBrienen
7535bb4661 cargo fmt 2025-03-15 21:32:01 +01:00
BenjaminBrienen
70fc7b98c6 edition = "2024" 2025-03-15 21:32:01 +01:00
Lukas Wirth
029878eff9 chore: Drop legacy salsa 2025-03-15 12:02:31 -04:00
David Barsky
74620e64ec internal: port rust-analyzer to new Salsa 2025-03-10 13:30:51 -04:00
David Barsky
7a7ff470ca internal: vendor query-group-macro 2025-03-10 10:12:52 -04:00
Laurențiu Nicola
e039ae794d Use cargo zigbuild for releases 2025-02-26 14:16:09 +02:00
niller-g
18d6e281b3 Fix codegen of parser inline tests runner
When running `cargo codegen` the `crates/parser/test_data/generated/runner.rs` file is only updated when some file in `crates/parser/test_data/inline` changes. However this is not sufficient in all cases
2025-02-23 11:41:34 +01:00
niller-g
7236109f56 Fix parser inline tests codegen panics
When running `cargo codegen` the cwd="rust-analyzer" however when running `cargo test` the cwd="rust-analyzer/xtask" which makes the codegen panic
2025-02-23 11:34:44 +01:00
Josh Rotenberg
5968782ce6 missed the L for the line number 2025-02-19 16:52:12 -08:00
Lukas Wirth
9691da7707
Merge pull request #19180 from joshrotenberg/fix-source-file-url
doc: use fully qualified url for source path
2025-02-19 06:37:01 +00:00
Josh Rotenberg
ea9e179287 use fully qualified url for source path 2025-02-18 12:57:18 -08:00
Benjamin Brienen
e5484d9c73
Fix dead link 2025-02-18 17:22:45 +01:00
Josh Rotenberg
f40ff2d8dc move dev docs to manual
fix formatting
2025-02-17 10:47:27 -08:00
Wilfred Hughes
3251d1caa7 manual: Fix URLs to rustdoc pages
Now that the manual lives at /manual/, we need to use absolute URLs
to link to rustdoc content.
2025-02-11 12:10:32 -08:00
Lukas Wirth
4dc936bfe2 Bump proc-macro2 in xtask 2025-02-05 08:22:20 +01:00
Laurențiu Nicola
b0276dd240 Stop running some release workflows on forks and update old URLs 2025-02-01 08:21:14 +02:00
Wilfred Hughes
deda58e8f1 manual: Convert to mdbook
Split manual.adoc into markdown files, one for each chapter.

For the parts of the manual that are generated from source code doc
comments, update the comments to use markdown syntax and update the
code generators to write to `generated.md` files.

For the weekly release, stop copying the .adoc files to the
`rust-analyzer/rust-analyzer.github.io` at release time. Instead,
we'll sync the manual hourly from this repository.

See https://github.com/rust-analyzer/rust-analyzer.github.io/pull/226
for the sync. This PR should be merged first, and that PR needs to be
merged before the next weekly release.

This change is based on #15795, but rebased and updated. I've also
manually checked each page for markdown syntax issues and fixed any I
encountered.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
Co-authored-by: Josh Rotenberg <joshrotenberg@gmail.com>
2025-01-24 13:23:22 -08:00
Lukas Wirth
4b6007115a minor: New clippy lints 2025-01-06 17:57:17 +01:00
Chayim Refael Friedman
505e82c19c Add a function to convert a SyntaxKind to its text, where possible
This will also help for the make's quote macro.
2024-12-30 04:01:05 +02:00
Chayim Refael Friedman
737500137f Generate a method for static retrieval of the SyntaxKind of a node, where possible
This will help for the quote macro for `ast::make`.
2024-12-30 03:13:17 +02:00
Lukas Wirth
5ce14b0439 Enforce a current directory being set for spawned commands 2024-12-29 12:51:13 +01:00
Lukas Wirth
5211972743 internal: Split serde derive feature into serde_derive usage
Ideally we'd not have any dependency pull in the derive feature for faster build times, once that is the case this change would have an actual effect.
See https://github.com/matklad/macro-dep-test/blob/master/README.md for context.
2024-12-20 11:55:02 +01:00
Chayim Refael Friedman
0b7a6f38d7 Properly handle different defaults for severity of lints
Previously all lints were assumed to be `#[warn]`, and we had a hand-coded list of `#[allow]` exceptions. Now the severity is autogenerated from rustdoc output.

Also support lints that change status between editions, and the `warnings` lint group.
2024-12-11 20:48:41 +02:00