Stream: t-compiler/wg-rls-2.0

Topic: rustc development


oli (Dec 15 2019 at 14:19, on Zulip):

I'm trying to run rust-analyzer while working on rustc. Since I'm mostly working on stage1, I set

oli (Dec 15 2019 at 14:19, on Zulip):

This gets me beyond libcore at least, but then I get amusing errors :D

oli (Dec 15 2019 at 14:20, on Zulip):

the size for values of type Stream cannot be known at compilation time
the trait core::marker::Sized is not implemented for Stream
to learn more, visit <https://doc.rust-lang.org/book/ch19-04-advanced-types.html#dynamically-sized-types-and-the-sized-trait>

oli (Dec 15 2019 at 14:21, on Zulip):

There's two things amusing about this, the errors themselves (there's more like can't index "Vec<&str>" and similar

oli (Dec 15 2019 at 14:21, on Zulip):

The second amusing thing is that I get paths like /home/oliver/Projects/rust/rustc/workdirs/rust7/home/oliver/.cargo/registry/src/github.com-1ecc6299db9ec823/atty-0.2.11/src/lib.rs

oli (Dec 15 2019 at 14:22, on Zulip):

Note that my pwd is /home/oliver/Projects/rust/rustc/workdis/rust7

oli (Dec 15 2019 at 14:22, on Zulip):

I'll keep posting here with my progress

oli (Dec 15 2019 at 14:25, on Zulip):

I'm moderately certain that the Sized errors are happening because of bootstrapping issues where the beta libcore and the stage0 libcore are somehow messing with everything

matklad (Dec 15 2019 at 14:26, on Zulip):

@oli these errors are from running cargo watch, which internally is using cargo check. I think vanilla cargo check won't work with rustc though

matklad (Dec 15 2019 at 14:26, on Zulip):

So perhaps the best solution here is to override cargo check command with appropriate ./x.py check (there's a config option for that).

oli (Dec 15 2019 at 14:26, on Zulip):

oh

oli (Dec 15 2019 at 14:26, on Zulip):

neat

oli (Dec 15 2019 at 14:27, on Zulip):

/me tries

matklad (Dec 15 2019 at 14:28, on Zulip):

Note that I personally don't use cargo watch functionality: for me the lag on non-trivial projects is significant, so I stick with just invoking an approriate complation command with a shortcut (which still gives you inline errors, which are not updated as you type)

oli (Dec 15 2019 at 14:30, on Zulip):

oh I didn't know that existed

matklad (Dec 15 2019 at 14:32, on Zulip):

The shortcut to run compilation? There are two of them:

15:30:31|~
λ bat ~/projects/rust/.vscode/tasks.json
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "check",
            "type": "shell",
            "command": "./x.py check",
            "problemMatcher": "$rustc",
            "group": "build",
            "presentation": {
                "clear": true
            }
        }
    ]
}
oli (Dec 15 2019 at 14:38, on Zulip):

Oh that's even better, then I can keep building everything on the remote machine

Zoxc (Dec 30 2019 at 17:20, on Zulip):

I just tried rust-analyzer with rustc. It seems to work pretty well. Having path contexts in VS Code is quite handy for large impls. It does give errors about static move || { yield } though.

Zoxc (Dec 30 2019 at 17:23, on Zulip):

Oh, it can goto proc macro impls too :D

Last update: Sep 18 2020 at 20:15UTC