-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
bandwhich: patch dependency to avoid panics #135804
Conversation
Can you create a PR with that and fetch the PR from there? I don't think we want to include 3k lines just for a patch. |
de3b3a6
to
2f4d1a0
Compare
Panic messages rendered the output unreadable, these panics came from a bug in the linked-hash-map dependency. The patch file is huge because Cargo.lock format changed, but the only thing I ran was: cargo update -p linked-hash-map
2f4d1a0
to
8798aaa
Compare
Hmm, why did you close the upstream PR? |
@Ma27 the goal of opening the PR was to host the patch; the version in nixpkgs is v0.20.0 but their master branch has evolved since 0.20.0, and the patch needed for nixpkgs doesn't apply on their master branch, so I'd need to open another PR anyway (or rebase the existing PR branch now that the original patch is hosted somewhere) |
there's also imsnif/bandwhich#192 which does include a dependency update, so that's covered there if it ever gets merged |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works and fixes the panics.
Also, when using an older cargo version to update the dependency (e. g. by running nix run nixpkgs/nixos-20.03#cargo -- update -p linked-hash-map
) the patch is a lot shorter (49 lines):
Patch
diff --git a/Cargo.lock b/Cargo.lock
index 8244d96..e960e1e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -777,7 +777,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "linked-hash-map"
-version = "0.5.2"
+version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@@ -809,7 +809,7 @@ name = "lru-cache"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "linked-hash-map 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -1588,7 +1588,7 @@ version = "0.8.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"dtoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
- "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "linked-hash-map 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.102 (registry+https://github.com/rust-lang/crates.io-index)",
"yaml-rust 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
@@ -2105,7 +2105,7 @@ name = "yaml-rust"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
- "linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
+ "linked-hash-map 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@@ -2210,7 +2210,7 @@ dependencies = [
"checksum libc 0.2.76 (registry+https://github.com/rust-lang/crates.io-index)" = "755456fae044e6fa1ebbbd1b3e902ae19e73097ed4ed87bb79934a867c007bc3"
"checksum libflate 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e9bac9023e1db29c084f9f8cd9d3852e5e8fddf98fb47c4964a0ea4663d95949"
"checksum libflate_lz77 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3286f09f7d4926fc486334f28d8d2e6ebe4f7f9994494b6dab27ddfad2c9b11b"
-"checksum linked-hash-map 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83"
+"checksum linked-hash-map 0.5.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
"checksum lock_api 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75"
"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b"
"checksum log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this PR as is and I'm all for merging. You can also use @sbruder's patch at your discretion. I'll merge this PR on Tuesday if nothing comes up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works and fixes the panics for me.
Panic messages rendered the output unreadable, these panics came from a bug in the linked-hash-map dependency. The patch file is huge because Cargo.lock format changed, but the only thing I ran was:
See imsnif/bandwhich#192 (comment) for the comment where the fix is mentioned
Motivation for this change
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)