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

package level flycheck checks wrong packages #18844

Closed
Veykril opened this issue Jan 6, 2025 · 0 comments · Fixed by #18845
Closed

package level flycheck checks wrong packages #18844

Veykril opened this issue Jan 6, 2025 · 0 comments · Fixed by #18845
Labels
A-flycheck issues with flycheck a.k.a. "check on save" A-vfs

Comments

@Veykril
Copy link
Member

Veykril commented Jan 6, 2025

@Veykril Sorry for the late response. I tried to modify the crates/stdx/src/lib.rs file and run flycheck afterward, and its behavior clearly differs from cargo check -p stdx. For some reason, flycheck runs check for base-db and not for stdx. Here are the logs and the recorded video for this case.

2025-01-05T18:46:45.938624162+01:00 DEBUG will restart flycheck command=cd "/home/mhnap/projects/mhnap/rust-analyzer" && RUSTUP_TOOLCHAIN="/home/mhnap/.rustup/toolchains/stable-x86_64-unknown-linux-gnu" "/home/mhnap/.cargo/bin/cargo" "check" "-p" "base-db" "--message-format=json-diagnostic-rendered-ansi" "--manifest-path" "/home/mhnap/projects/mhnap/rust-analyzer/Cargo.toml" "--keep-going"
2025-01-05T18:46:46.005160524+01:00 DEBUG did restart flycheck command="cd \"/home/mhnap/projects/mhnap/rust-analyzer\" && RUSTUP_TOOLCHAIN=\"/home/mhnap/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\" \"/home/mhnap/.cargo/bin/cargo\" \"check\" \"-p\" \"base-db\" \"--message-format=json-diagnostic-rendered-ansi\" \"--manifest-path\" \"/home/mhnap/projects/mhnap/rust-analyzer/Cargo.toml\" \"--keep-going\""
2025-01-05T18:46:46.306689911+01:00 TRACE artifact received flycheck_id=0 artifact="stdx" package_id="path+file:///home/mhnap/projects/mhnap/rust-analyzer/crates/stdx#0.0.0"
2025-01-05T18:46:46.391448038+01:00 TRACE artifact received flycheck_id=0 artifact="tt" package_id="path+file:///home/mhnap/projects/mhnap/rust-analyzer/crates/tt#0.0.0"
2025-01-05T18:46:46.398502278+01:00 TRACE artifact received flycheck_id=0 artifact="vfs" package_id="path+file:///home/mhnap/projects/mhnap/rust-analyzer/crates/vfs#0.0.0"
2025-01-05T18:46:46.467349074+01:00 TRACE artifact received flycheck_id=0 artifact="cfg" package_id="path+file:///home/mhnap/projects/mhnap/rust-analyzer/crates/cfg#0.0.0"
2025-01-05T18:46:46.986303704+01:00 TRACE artifact received flycheck_id=0 artifact="syntax" package_id="path+file:///home/mhnap/projects/mhnap/rust-analyzer/crates/syntax#0.0.0"
2025-01-05T18:46:47.09822285+01:00 TRACE artifact received flycheck_id=0 artifact="span" package_id="path+file:///home/mhnap/projects/mhnap/rust-analyzer/crates/span#0.0.0"
2025-01-05T18:46:47.230643204+01:00 TRACE artifact received flycheck_id=0 artifact="base_db" package_id="path+file:///home/mhnap/projects/mhnap/rust-analyzer/crates/base-db#0.0.0"
2025-01-05T18:46:47.244136202+01:00 DEBUG flycheck finished flycheck_id=0
2025-01-05T18:46:47.244223339+01:00 TRACE clearing diagnostics flycheck_id=0 package_id="path+file:///home/mhnap/projects/mhnap/rust-analyzer/crates/stdx#0.0.0"
2025-01-05T18:46:47.244231679+01:00 TRACE clearing diagnostics flycheck_id=0 package_id="path+file:///home/mhnap/projects/mhnap/rust-analyzer/crates/span#0.0.0"
2025-01-05T18:46:47.244234937+01:00 TRACE clearing diagnostics flycheck_id=0 package_id="path+file:///home/mhnap/projects/mhnap/rust-analyzer/crates/base-db#0.0.0"
2025-01-05T18:46:47.244238174+01:00 TRACE clearing diagnostics flycheck_id=0 package_id="path+file:///home/mhnap/projects/mhnap/rust-analyzer/crates/cfg#0.0.0"
2025-01-05T18:46:47.244241091+01:00 TRACE clearing diagnostics flycheck_id=0 package_id="path+file:///home/mhnap/projects/mhnap/rust-analyzer/crates/syntax#0.0.0"
2025-01-05T18:46:47.244244379+01:00 TRACE clearing diagnostics flycheck_id=0 package_id="path+file:///home/mhnap/projects/mhnap/rust-analyzer/crates/vfs#0.0.0"
2025-01-05T18:46:47.244247176+01:00 TRACE clearing diagnostics flycheck_id=0 package_id="path+file:///home/mhnap/projects/mhnap/rust-analyzer/crates/tt#0.0.0"
Screencast.from.05-01-25.19.04.17.webm

Originally posted by @mhnap in #18562

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-flycheck issues with flycheck a.k.a. "check on save" A-vfs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant