Skip to content

Commit

Permalink
Changelog #248
Browse files Browse the repository at this point in the history
  • Loading branch information
lnicola committed Aug 26, 2024
1 parent d84fc67 commit ba03cd1
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 32 deletions.
4 changes: 2 additions & 2 deletions generated_assists.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ fn main() {

[discrete]
=== `convert_while_to_loop`
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/convert_while_to_loop.rs#L19[convert_while_to_loop.rs]
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/convert_while_to_loop.rs#L20[convert_while_to_loop.rs]

Replace a while with a loop.

Expand Down Expand Up @@ -1031,7 +1031,7 @@ fn qux(bar: Bar, baz: Baz) {}

[discrete]
=== `extract_expressions_from_format_string`
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_expressions_from_format_string.rs#L18[extract_expressions_from_format_string.rs]
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide-assists/src/handlers/extract_expressions_from_format_string.rs#L14[extract_expressions_from_format_string.rs]

Move an expression out of a format string.

Expand Down
32 changes: 6 additions & 26 deletions generated_config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,14 @@ Automatically refresh project info via `cargo metadata` on
--
Run build scripts (`build.rs`) for more precise code analysis.
--
[[rust-analyzer.cargo.buildScripts.invocationLocation]]rust-analyzer.cargo.buildScripts.invocationLocation (default: `"workspace"`)::
+
--
Specifies the working directory for running build scripts.
- "workspace": run build scripts for a workspace in the workspace's root directory.
This is incompatible with `#rust-analyzer.cargo.buildScripts.invocationStrategy#` set to `once`.
- "root": run build scripts in the project's root directory.
This config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#`
is set.
--
[[rust-analyzer.cargo.buildScripts.invocationStrategy]]rust-analyzer.cargo.buildScripts.invocationStrategy (default: `"per_workspace"`)::
+
--
Specifies the invocation strategy to use when running the build scripts command.
If `per_workspace` is set, the command will be executed for each workspace.
If `once` is set, the command will be executed once.
If `per_workspace` is set, the command will be executed for each Rust workspace with the
workspace as the working directory.
If `once` is set, the command will be executed once with the opened project as the
working directory.
This config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#`
is set.
--
Expand All @@ -75,8 +67,7 @@ option.
If there are multiple linked projects/workspaces, this command is invoked for
each of them, with the working directory being the workspace root
(i.e., the folder containing the `Cargo.toml`). This can be overwritten
by changing `#rust-analyzer.cargo.buildScripts.invocationStrategy#` and
`#rust-analyzer.cargo.buildScripts.invocationLocation#`.
by changing `#rust-analyzer.cargo.buildScripts.invocationStrategy#`.

By default, a cargo invocation will be constructed for the configured
targets and features, with the following base command line:
Expand Down Expand Up @@ -209,16 +200,6 @@ List of `cargo check` (or other command specified in `check.command`) diagnostic

For example for `cargo check`: `dead_code`, `unused_imports`, `unused_variables`,...
--
[[rust-analyzer.check.invocationLocation]]rust-analyzer.check.invocationLocation (default: `"workspace"`)::
+
--
Specifies the working directory for running checks.
- "workspace": run checks for workspaces in the corresponding workspaces' root directories.
This falls back to "root" if `#rust-analyzer.check.invocationStrategy#` is set to `once`.
- "root": run checks in the project's root directory.
This config only has an effect when `#rust-analyzer.check.overrideCommand#`
is set.
--
[[rust-analyzer.check.invocationStrategy]]rust-analyzer.check.invocationStrategy (default: `"per_workspace"`)::
+
--
Expand Down Expand Up @@ -250,8 +231,7 @@ Cargo, you might also want to change
If there are multiple linked projects/workspaces, this command is invoked for
each of them, with the working directory being the workspace root
(i.e., the folder containing the `Cargo.toml`). This can be overwritten
by changing `#rust-analyzer.check.invocationStrategy#` and
`#rust-analyzer.check.invocationLocation#`.
by changing `#rust-analyzer.check.invocationStrategy#`.

If `$saved_file` is part of the command, rust-analyzer will pass
the absolute path of the saved file to the provided command. This is
Expand Down
8 changes: 4 additions & 4 deletions generated_features.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ This is the same as `Go to Definition` with the following exceptions:


=== Go to Definition
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/goto_definition.rs#L28[goto_definition.rs]
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/goto_definition.rs#L25[goto_definition.rs]

Navigates to the definition of an identifier.

Expand All @@ -293,7 +293,7 @@ image::https://user-images.githubusercontent.com/48062697/113065563-025fbe00-91b
=== Go to Implementation
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/goto_implementation.rs#L11[goto_implementation.rs]

Navigates to the impl blocks of types.
Navigates to the impl items of types.

|===
| Editor | Shortcut
Expand Down Expand Up @@ -576,7 +576,7 @@ image::https://user-images.githubusercontent.com/48062697/113171066-105c2000-923


=== Open Docs
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/doc_links.rs#L121[doc_links.rs]
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/doc_links.rs#L118[doc_links.rs]

Retrieve a links to documentation for the given symbol.

Expand Down Expand Up @@ -649,7 +649,7 @@ image::https://user-images.githubusercontent.com/48062697/113065583-055aae80-91b


=== Semantic Syntax Highlighting
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting.rs#L66[syntax_highlighting.rs]
**Source:** https://github.com/rust-lang/rust-analyzer/blob/master/crates/ide/src/syntax_highlighting.rs#L68[syntax_highlighting.rs]

rust-analyzer highlights the code semantically.
For example, `Bar` in `foo::Bar` might be colored differently depending on whether `Bar` is an enum or a trait.
Expand Down
12 changes: 12 additions & 0 deletions manual.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,12 @@ interface JsonProject {
/// several different "sysroots" in one graph of
/// crates.
sysroot_src?: string;
/// List of groups of common cfg values, to allow
/// sharing them between crates.
///
/// Maps from group name to its cfgs. Cfg follow
/// the same format as `Crate.cfg`.
cfg_groups?: { [key: string]: string[]; };
/// The set of crates comprising the current
/// project. Must include all transitive
/// dependencies as well as sysroot crate (libstd,
Expand Down Expand Up @@ -754,6 +760,12 @@ interface Crate {
include_dirs: string[],
exclude_dirs: string[],
},
/// List of cfg groups this crate inherits.
///
/// All cfg in these groups will be concatenated to
/// `cfg`. It is impossible to replace a value from
/// the groups.
cfg_groups?: string[];
/// The set of cfgs activated for a given crate, like
/// `["unix", "feature=\"foo\"", "feature=\"bar\""]`.
cfg: string[];
Expand Down
37 changes: 37 additions & 0 deletions thisweek/_posts/2024-08-26-changelog-248.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
= Changelog #248
:sectanchors:
:experimental:
:page-layout: post

Commit: commit:7106cd3be50b2a43c1d9f2787bf22d4369c2b25b[] +
Release: release:2024-08-26[] (`v0.3.2086`)

== New Features

* pr:17936[] implement `module_path!`.
* pr:17857[] allow declaring `cfg` groups in `rust-project.json`.
* pr:17927[], pr:17955[] speed up search for short associated functions.

== Fixes

* pr:17942[] implement floating point casts in const eval.
* pr:17958[] Consider `Deref` impls in trait method completions.
* pr:17960[] use `extra_test_bin_args` in Test Explorer runner.
* pr:17925[] include generics when lowering `extern type`.
* pr:17928[] keep comments in "Convert `while` to `loop`".
* pr:17924[] fix panic when a TAIT exists in a RPIT.
* pr:17932[] fix semantic highlighting panics during start-up.
* pr:17939[], pr:17948[] improve handling of `Sized` predicates.
* pr:17943[] improve proc macro panic message and workspace loading failure diagnostic.
* pr:17912[], pr:17946[] run flycheck without reverse dependencies when target is specified.
* pr:17949[] watch build files from `rust-project.json`.
* pr:17956[] keep original error when retrying `cargo metadata` with `--no-deps`.
* pr:17913[] add workspace-level config to `rust-analyzer.toml`.

== Internal Improvements

* pr:17888[] remove `invocationLocation` in favor of `invocationStrategy`.
* pr:17886[] wait for cache priming before reporting that the server is ready.
* pr:17898[] improve macro token mapping heuristics.
* pr:17961[] don't allocate autoderef steps when not needed.
* pr:17930[] remove the ability to configure the user config path.

0 comments on commit ba03cd1

Please sign in to comment.