rust-lang / rust-lang/rust-analyzer
Unable to run any test in VSCode
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer version: rust-analyzer version: 0.4.2270-standalone
rustc version: rustc 1.86.0-nightly (6067b3631 2025-01-17)
editor or extension: vscode extension 0.4.2270
relevant settings: set in settings.json:
{
"terminal.integrated.env.linux": {
"PATH": "/workspaces/pyo3/venv/bin:/home/codespace/.cargo/bin"
},
"debug.allowBreakpointsEverywhere": true,
"rust-analyzer.server.extraEnv": {
"CARGO": "/home/codespace/.cargo/bin/cargo",
"RUSTC": "/home/codespace/.cargo/bin/rustc"
},
"rust-analyzer.cargo.extraEnv": {"PATH": "/home/codespace/.cargo/bin"}
}
repository link (if public, optional): clin1234/pyo3
code snippet to reproduce:
#[test]
#[cfg(not(Py_LIMITED_API))]
fn ascii_object_bitfield() {
let ob_base: PyObject = unsafe { std::mem::zeroed() };
let mut o = PyASCIIObject {
ob_base,
length: 0,
#[cfg(not(PyPy))]
hash: 0,
state: 0u32,
#[cfg(not(Py_3_12))]
wstr: std::ptr::null_mut() as *mut wchar_t,
};
unsafe {
assert_eq!(o.interned(), 0);
assert_eq!(o.kind(), 0);
assert_eq!(o.compact(), 0);
assert_eq!(o.ascii(), 0);
#[cfg(not(Py_3_12))]
assert_eq!(o.ready(), 0);
let interned_count = if cfg!(Py_3_12) { 2 } else { 4 };
for i in 0..interned_count {
o.set_interned(i);
assert_eq!(o.interned(), i);
}
for i in 0..8 {
o.set_kind(i);
assert_eq!(o.kind(), i);
}
o.set_compact(1);
assert_eq!(o.compact(), 1);
o.set_ascii(1);
assert_eq!(o.ascii(), 1);
#[cfg(not(Py_3_12))]
o.set_ready(1);
#[cfg(not(Py_3_12))]
assert_eq!(o.ready(), 1);
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided ascii_object_bitfield test in clin1234/pyo3 with the listed rust-analyzer, rustc, VS Code extension, and settings. Then trace rust-analyzer's test-running entry point and relevant logs to determine why the test cannot launch; done means the test runs from VS Code and the failure has regression coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, vscode
- Domain
- developer-experience, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100