Skip to content

Commit

Permalink
fix: we cannot pprof in windows (#74)
Browse files Browse the repository at this point in the history
`pprof` is a "unix" only dependency. Even though we do not "use" it
anywhere not protected by `cfg!`, it seems as though `cargo test` builds
all dependencies, which `pprof` fails.

Fix is simple, simply only include that dep on `unix` systems. Confirmed
testing/building on my Windows machine.

closes: #66
  • Loading branch information
maraisr authored Dec 17, 2024
1 parent 9d99419 commit 12d55ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/hdx_lsp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ tracing-subscriber = { workspace = true }
[dev-dependencies]
glob = { workspace = true }
criterion = { workspace = true, features = ["html_reports"] }
pprof = { workspace = true, features = ["flamegraph", "criterion"] }
insta = { workspace = true, features = ["json"] }
similar = { workspace = true }
console = { workspace = true }

[target.'cfg(target_family = "unix")'.dev-dependencies]
pprof = { workspace = true, features = ["flamegraph", "criterion"] }

[features]
default = []
fancy = ["miette/fancy-no-backtrace"]

0 comments on commit 12d55ef

Please sign in to comment.