Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple errors after updating to v0.3.2053 #17765

Closed
Shinribo opened this issue Aug 1, 2024 · 8 comments
Closed

Multiple errors after updating to v0.3.2053 #17765

Shinribo opened this issue Aug 1, 2024 · 8 comments
Labels
C-bug Category: bug

Comments

@Shinribo
Copy link

Shinribo commented Aug 1, 2024

OS: Win11 Pro
After updating VSC and rust-analyser i get multiple errors directly when opening the editor.
Reinstalling the extension didnt work. As far as i know i didnt update rust.

rust-analyzer version: 0.3.2053-standalone (fd74511 2024-07-28)
rustc version: rustc 1.73.0-nightly (da6b55cc5 2023-07-17)

repository link (if public, optional): https://github.com/Shinribo/nunix-kernel

2024-08-01T15:14:35.216207Z ERROR Failed to discover cargo config env: "C:\Users\Admin\.cargo\bin\cargo.exe" "-Z" "unstable-options" "config" "get" "env" failed, exit code: 101
stderr:
error: config value env is not set

Stack backtrace:
0: std::backtrace_rs::backtrace::dbghelp64::trace
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src....\backtrace\src\backtrace\dbghelp64.rs:91
1: std::backtrace_rs::backtrace::trace_unsynchronized
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src....\backtrace\src\backtrace\mod.rs:66
2: std::backtrace::Backtrace::create
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src\backtrace.rs:331
3: std::backtrace::Backtrace::capture
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src\backtrace.rs:296
4: anyhow::error::::msg
5: project_model::utf8_stdout
6: project_model::env::cargo_config_env
7: project_model::workspace::ProjectWorkspace::load
8: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
9: core::ops::function::FnOnce::call_once{{vtable.shim}}
10: std::sys_common::backtrace::__rust_begin_short_backtrace
11: std::thread::Builder::spawn_unchecked
12: alloc::boxed::impl$48::call_once
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\alloc\src\boxed.rs:2063
13: alloc::boxed::impl$48::call_once
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\alloc\src\boxed.rs:2063
14: std::sys::pal::windows::thread::impl$0::new::thread_start
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src\sys\pal\windows\thread.rs:52
15: BaseThreadInitThunk
16: RtlUserThreadStart
2024-08-01T15:14:35.295430Z ERROR FetchBuildDataError:
error: the --keep-going flag is unstable, pass -Z unstable-options to enable it
See rust-lang/cargo#10496 for more information about the --keep-going flag.

2024-08-01T15:14:35.607422Z ERROR Failed to discover cargo config env: "C:\Users\Admin\.cargo\bin\cargo.exe" "-Z" "unstable-options" "config" "get" "env" failed, exit code: 101
stderr:
error: config value env is not set

Stack backtrace:
0: std::backtrace_rs::backtrace::dbghelp64::trace
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src....\backtrace\src\backtrace\dbghelp64.rs:91
1: std::backtrace_rs::backtrace::trace_unsynchronized
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src....\backtrace\src\backtrace\mod.rs:66
2: std::backtrace::Backtrace::create
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src\backtrace.rs:331
3: std::backtrace::Backtrace::capture
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src\backtrace.rs:296
4: anyhow::error::::msg
5: project_model::utf8_stdout
6: project_model::env::cargo_config_env
7: project_model::workspace::ProjectWorkspace::load
8: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
9: core::ops::function::FnOnce::call_once{{vtable.shim}}
10: std::sys_common::backtrace::__rust_begin_short_backtrace
11: std::thread::Builder::spawn_unchecked
12: alloc::boxed::impl$48::call_once
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\alloc\src\boxed.rs:2063
13: alloc::boxed::impl$48::call_once
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\alloc\src\boxed.rs:2063
14: std::sys::pal::windows::thread::impl$0::new::thread_start
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src\sys\pal\windows\thread.rs:52
15: BaseThreadInitThunk
16: RtlUserThreadStart
2024-08-01T15:14:35.772936Z ERROR Flycheck failed to run the following command: CommandHandle { program: "C:\Users\Admin\.cargo\bin\cargo.exe", arguments: ["check", "--workspace", "--message-format=json-diagnostic-rendered-ansi", "--manifest-path", "C:\Users\Admin\Documents\OSDEV\NUNIX Projekte\nunix-kernel\Cargo.toml", "--keep-going", "--all-targets"], current_dir: Some("C:\Users\Admin\Documents\OSDEV\NUNIX Projekte\nunix-kernel") }, error=Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(ExitStatus(101))):
error: the --keep-going flag is unstable, pass -Z unstable-options to enable it
See rust-lang/cargo#10496 for more information about the --keep-going flag.

2024-08-01T15:14:35.967106Z ERROR Failed to discover cargo config env: "C:\Users\Admin\.cargo\bin\cargo.exe" "-Z" "unstable-options" "config" "get" "env" failed, exit code: 101
stderr:
error: config value env is not set

Stack backtrace:
0: std::backtrace_rs::backtrace::dbghelp64::trace
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src....\backtrace\src\backtrace\dbghelp64.rs:91
1: std::backtrace_rs::backtrace::trace_unsynchronized
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src....\backtrace\src\backtrace\mod.rs:66
2: std::backtrace::Backtrace::create
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src\backtrace.rs:331
3: std::backtrace::Backtrace::capture
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src\backtrace.rs:296
4: anyhow::error::::msg
5: project_model::utf8_stdout
6: project_model::env::cargo_config_env
7: project_model::workspace::ProjectWorkspace::load
8: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
9: core::ops::function::FnOnce::call_once{{vtable.shim}}
10: std::sys_common::backtrace::__rust_begin_short_backtrace
11: std::thread::Builder::spawn_unchecked
12: alloc::boxed::impl$48::call_once
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\alloc\src\boxed.rs:2063
13: alloc::boxed::impl$48::call_once
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\alloc\src\boxed.rs:2063
14: std::sys::pal::windows::thread::impl$0::new::thread_start
at /rustc/051478957371ee0084a7c0913941d2a8c4757bb9/library\std\src\sys\pal\windows\thread.rs:52
15: BaseThreadInitThunk
16: RtlUserThreadStart
2024-08-01T15:14:36.140192Z ERROR Flycheck failed to run the following command: CommandHandle { program: "C:\Users\Admin\.cargo\bin\cargo.exe", arguments: ["check", "--workspace", "--message-format=json-diagnostic-rendered-ansi", "--manifest-path", "C:\Users\Admin\Documents\OSDEV\NUNIX Projekte\nunix-kernel\Cargo.toml", "--keep-going", "--all-targets"], current_dir: Some("C:\Users\Admin\Documents\OSDEV\NUNIX Projekte\nunix-kernel") }, error=Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(ExitStatus(101))):
error: the --keep-going flag is unstable, pass -Z unstable-options to enable it
See rust-lang/cargo#10496 for more information about the --keep-going flag.

@Shinribo Shinribo added the C-bug Category: bug label Aug 1, 2024
@lnicola
Copy link
Member

lnicola commented Aug 1, 2024

Try the pre-release build.

@Shinribo
Copy link
Author

Shinribo commented Aug 1, 2024

down to the warnings below:

2024-08-01T15:27:24.810743Z ERROR Flycheck failed to run the following command: CommandHandle { program: "C:\Users\Admin\.cargo\bin\cargo.exe", arguments: ["check", "--workspace", "--message-format=json-diagnostic-rendered-ansi", "--manifest-path", "C:\Users\Admin\Documents\OSDEV\NUNIX Projekte\nunix-kernel\.\Cargo.toml", "--keep-going", "--all-targets"], current_dir: Some("C:\Users\Admin\Documents\OSDEV\NUNIX Projekte\nunix-kernel") }, error=Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(ExitStatus(101))):
error: the --keep-going flag is unstable, pass -Z unstable-options to enable it
See rust-lang/cargo#10496 for more information about the --keep-going flag.

2024-08-01T15:27:25.074651Z ERROR FetchBuildDataError:
error: the --keep-going flag is unstable, pass -Z unstable-options to enable it
See rust-lang/cargo#10496 for more information about the --keep-going flag.

2024-08-01T15:27:25.356959Z ERROR Flycheck failed to run the following command: CommandHandle { program: "C:\Users\Admin\.cargo\bin\cargo.exe", arguments: ["check", "--workspace", "--message-format=json-diagnostic-rendered-ansi", "--manifest-path", "C:\Users\Admin\Documents\OSDEV\NUNIX Projekte\nunix-kernel\.\Cargo.toml", "--keep-going", "--all-targets"], current_dir: Some("C:\Users\Admin\Documents\OSDEV\NUNIX Projekte\nunix-kernel") }, error=Cargo watcher failed, the command produced no valid metadata (exit code: ExitStatus(ExitStatus(101))):
error: the --keep-going flag is unstable, pass -Z unstable-options to enable it
See rust-lang/cargo#10496 for more information about the --keep-going flag.

@Shinribo
Copy link
Author

Shinribo commented Aug 1, 2024

It also now starts to display code errors and warnings but only for opened files

@lnicola
Copy link
Member

lnicola commented Aug 1, 2024

Failed to discover cargo config env: "C:\Users\Admin.cargo\bin\cargo.exe" "-Z" "unstable-options" "config" "get" "env" failed, exit code: 101

That was fixed in #17744

error: the --keep-going flag is unstable, pass -Z unstable-options to enable it

You need to upgrade your toolchain, see #17608.

@Shinribo
Copy link
Author

Shinribo commented Aug 1, 2024

Thanks now it works.

@Shinribo Shinribo closed this as completed Aug 1, 2024
@Shinribo
Copy link
Author

Shinribo commented Aug 1, 2024

Also it didnt work at first bc apparently llvm changed the data layout for x86-64 when using a custom target tripplet.

@lnicola
Copy link
Member

lnicola commented Aug 1, 2024

Yeah, if you're stuck on an old nightly, you might need to use an old r-a, we can't realistically support every Rust version out there.

@Shinribo
Copy link
Author

Shinribo commented Aug 1, 2024

luckily i just forgot about setting a newer toolchain in my project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants