profile
viewpoint
Lukas Wirth Veykril @ferrous-systems Germany veykril.github.io @rust-analyzer tinkerer and @ferrocene specifier

Veykril/cubism-rs 32

A rust wrapper around the Live2D Cubism SDK with extra functionality

Veykril/blend2d-rs 22

Blend2D Bindings for Rust

Veykril/blender-sro-plugin 6

A Silkroad Resource Import Addon for Blender

Veykril/crab-claw 6

A mesh slicing library written in rust

Veykril/base65536-python 2

base65536 implementation written in python

Veykril/DestinyChildBot 2

A Destiny Child Bot For Discord

issue commentrust-lang/rust-analyzer

Rainbow brackets on type generics

We don't host the textmate grammar for rust, that is upstreamed in VSCode. The rust extension there (which solely provides said grammar) would need to set appropriate balancedBracketScopes, something like

"balancedBracketScopes": [
                    "punctuation.brackets.angle.rust",
                    "punctuation.brackets.square.rust",
                    "punctuation.brackets.curly.rust",
                    "punctuation.brackets.round.rust",
                    "punctuation.brackets.attribute.rust"
                ]

Ideally the whole thing would work with semantic tokens as thats what rust-analyzer emits but VSCode doesn't allow that, neither does it respect semantic token to textmate token fallback to work with it. So there isn't really anything to do from our side here.

Seltyk

comment created time in 7 hours

pull request commentrust-lang/rust-analyzer

[editors/code] add markdown syntax highlighting to doc comments

So I just realized, but this does not work for me 🤔 Is there something specific one has to do in VSC to make injected grammars work?

AndreasBackx

comment created time in 7 hours

PullRequestReviewEvent

pull request commentrust-lang/rust

:arrow_up: rust-analyzer

Oh that was a mistake, the feature should've stayed there I think. The test is still wanted.

lnicola

comment created time in 16 hours

pull request commentrust-lang/rust-analyzer

Emit `'_` for lifetime generics in `HirDisplay`

https://github.com/rust-lang/rust/issues/54910

HKalbasi

comment created time in 20 hours

pull request commentrust-lang/rust-analyzer

Emit `'_` for lifetime generics in `HirDisplay`

But that is an allow by default lint, so should we do this?

We should, that lint should be warn by default anyways, but there was some reason as to why some of the 2018 lints are still allowed by default.

HKalbasi

comment created time in 21 hours

pull request commentkyren/gc-arena

`DynamicRootSet` additions

Fwiw, it would be pretty easy to make the derive macro work in gc-arena itself by just adding an extern crate self as gc_arena; alias to the crate root of gc-arena.

Though its questionable whether you should use it if you don't have to since that would make gc-arena itself depend on syn.

moulins

comment created time in a day

PullRequestReviewEvent

Pull request review commentrust-lang/rust-analyzer

fix: consider outer binders when folding captured items' type

 impl<'a> InferenceContext<'a> {     // used this function for another workaround, mention it here. If you really need this function and believe that     // there is no problem in it being `pub(crate)`, remove this comment.     pub(crate) fn resolve_all(self) -> InferenceResult {+        // NOTE: `InferenceResult::closure_info` is `resolve_completely()`'d during+        // `InferenceContext::infer_closures()` (in `HirPlace::ty()` specifically).         let InferenceContext { mut table, mut result, .. } = self;

it might help to destructure result here so that when a new field is added it will error here

lowr

comment created time in 2 days

PullRequestReviewEvent

issue commentrust-lang/rust-analyzer

My guy be usin' 8GB of memory

how long were you using that rust-analyzer session, over time the memory usage will increase as we don't free analysis related things. So the more code you touch the more of the analysis will be in memory

J-Cake

comment created time in 2 days

issue commentrust-lang/rust-analyzer

In `rust-lang/rust`, `R-A` can't resolve symbols from the stdlib when inside `libtest` (without changing the config to break the same thing in the compiler)

You cannot fathom how much I hate the rustc workspace.

So the cause of this is https://github.com/rust-lang/rust-analyzer/pull/14935 which fixes some other issues related to the sysroot having been duplicated (for certain reasons). Now that we no longer do this we get a ton of cycles. How does rustc know when to inject the sysroot and when not to on its own workspace? That is basically the problem here, since the library crates depend on a bunch of other crates that have the sysroot injected by r-a again when it shouldn't I suppose

thomcc

comment created time in 2 days

delete branch Veykril/rust-analyzer

delete branch : inert-attrs

delete time in 2 days

pull request commentrust-lang/rust-analyzer

Update builtin attribute list

@bors r+

Veykril

comment created time in 2 days

PR opened rust-lang/rust-analyzer

Update builtin attribute list
+115 -62

0 comment

4 changed files

pr created time in 2 days

create barnchVeykril/rust-analyzer

branch : inert-attrs

created branch time in 2 days

issue openedrust-lang/rust-analyzer

Diagnostics calculated from `include`d files report them for the wrong file

Our diagnostics infra was written with the idea in mind that dianostics reported from macro expansions will only end up in the calling file and as such we never verify that the upmapped ranges belong to the file we calculate the diagnostics for. This assumption is incorrect, include! calls in fact have two macro inputs from differing files, as such, any diagnostic calculated from an included file right now will either report the diagnostic in some random location in the calling file or worse crash the server.

An example crash test case for unresolved_macro_call diagnostic:

    #[test]
    fn include_does_not_break_diagnostics() {
        check_diagnostics(
            r#"
//- minicore: include
//- /lib.rs crate:lib
include!("include-me.rs");
//- /include-me.rs
/// long doc that pushes the diagnostic range beyond the first file's text length
#[err]
mod prim_never {}
"#,
        );
    }

created time in 2 days

pull request commentrust-lang/rust-analyzer

Revert "Add mandatory panic contexts to all threadpool tasks"

@bors r+

Veykril

comment created time in 2 days

PR opened rust-lang/rust-analyzer

Revert "Add mandatory panic contexts to all threadpool tasks"

Reverts rust-lang/rust-analyzer#14965

This won't quite work actually given the use of catch_unwind in some of these

+138 -174

0 comment

5 changed files

pr created time in 2 days

create barnchrust-lang/rust-analyzer

branch : revert-14965-panic-ctx

created branch time in 2 days

delete branch Veykril/rust-analyzer

delete branch : panic-ctx

delete time in 2 days

pull request commentrust-lang/rust-analyzer

Add mandatory panic contexts to all threadpool tasks

@bors r+

Veykril

comment created time in 2 days

PR opened rust-lang/rust-analyzer

Add mandatory panic contexts to all threadpool tasks

the diagnostics task is panicking I think, but without this you can't really tell because the stack trace ends in a generic iterator fold call instead of something specific.

+174 -138

0 comment

5 changed files

pr created time in 2 days

create barnchVeykril/rust-analyzer

branch : panic-ctx

created branch time in 2 days

issue closedrust-lang/rust-analyzer

Wacky color highlighting caused by declarative macro inside another declarative macro in VS Code

<!-- Troubleshooting guide: https://rust-analyzer.github.io/manual.html#troubleshooting Forum for questions: https://users.rust-lang.org/c/ide/14

Before submitting, please make sure that you're not running into one of these known issues:

  1. on-the-fly diagnostics are mostly unimplemented (cargo check diagnostics will be shown when saving a file): #3107

Otherwise please try to provide information which will help us to fix the issue faster. Minimal reproducible examples with few dependencies are especially lovely <3. -->

rust-analyzer version: (eg. output of "rust-analyzer: Show RA Version" command, accessible in VSCode via <kbd>Ctrl/⌘</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd>)

0.3.1533-standalone 0.4.1539-standalone

rustc version: (eg. output of rustc -V)

rustc 1.69.0 rustc 1.70.0

relevant settings: (eg. client settings, or environment variables like CARGO, RUSTC, RUSTUP_HOME or CARGO_HOME)

default by cargo new XXXX

Report Wacky color highlighting caused by declarative macro inside another declarative macro in VS Code.

Expected(?) (before rust-analyzer loaded) result: ok

Actual result: err

Code:

let bol = true;

    // minimal reproduction
    let _ = format!("{}", {
        format!("");
        bol 
    },);

    let _ = format!(
        "{}{}{}",
        // ok
        if bol { "beep" } else { "boop" },
        // broke here
        format!("beep"),
        // broken :(
        if bol {
            "beep"
        } else {
            match bol {
                true => "beep",
                false => "boop",
            }
        }
    );

closed time in 2 days

Pieresqi

issue commentrust-lang/rust-analyzer

Wacky color highlighting caused by declarative macro inside another declarative macro in VS Code

This is https://github.com/rust-lang/rust-analyzer/issues/14841

Pieresqi

comment created time in 2 days

pull request commentrust-lang/rust-analyzer

Add span to group.

No, we want as little changes in the upstream subtree as possible. We are just lacking behind with the syncs atm because of problems we had at our hand. We might be able to sync next week again, then we can merge this.

jneem

comment created time in 2 days

pull request commentrust-lang/rust-analyzer

Add span to group.

This will have to wait for the the next subtree sync, that is also the reason why you ran into those weird problems

jneem

comment created time in 2 days

pull request commentrust-lang/rust-analyzer

Fix Assist "replace named generic type with impl trait"

@bors r+

justahero

comment created time in 4 days

PullRequestReviewEvent
more