Remove proptest dev-dependency in favor of manual randomization#59
Remove proptest dev-dependency in favor of manual randomization#59tnull wants to merge 1 commit intolightningdevkit:mainfrom
proptest dev-dependency in favor of manual randomization#59Conversation
|
👋 Thanks for assigning @tankyleo as a reviewer! |
src/util/key_obfuscator.rs
Outdated
There was a problem hiding this comment.
nit: if we have \t, let's also add \n and \r ? HAL tells me these would be matched by the earlier regex given \s
There was a problem hiding this comment.
Alright, now amended to include (though I doubt it makes any difference, in practice our charset should be much more restrictive anyways):
diff --git a/src/util/key_obfuscator.rs b/src/util/key_obfuscator.rs
index 4e7ade2..c096e3d 100644
--- a/src/util/key_obfuscator.rs
+++ b/src/util/key_obfuscator.rs
@@ -200,5 +200,5 @@ mod tests {
let charset =
- b"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_!@#,;:% *$^&()[]{}.\t";
+ b"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_!@#,;:% *$^&()[]{}.\t\n\r";
let mut rng = rand::thread_rng();A sub-dependency of `proptest` started depending on `getrandom` v0.4.1 which uses `edition = 2024`, which isn't supported in our MSRV of 1.75.0. Here we replace the `proptest`-based round-trip test with a simple loop using `rand` (already a regular dependency) to generate random inputs. This removes a dev-dependency and its associated MSRV pin in CI. Co-Authored-By: HAL 9000 Signed-off-by: Elias Rohrer <dev@tnull.de>
a91f2e7 to
8be27f1
Compare
| @@ -26,7 +26,6 @@ jobs: | |||
| if: matrix.msrv | |||
| run: | | |||
| cargo update -p idna_adapter --precise 1.1.0 # This has us use `unicode-normalization` which has a more conservative MSRV | |||
There was a problem hiding this comment.
Want to note that it would be nice to drop this pin at some point, now that we don't depend on url anymore. However, we do still depend on it through mockito. Given we previously wondered how much benefit the mock testing gives us to begin with, we might at some point consider to drop that dev-dependency, too.
A sub-dependency of
propteststarted depending ongetrandomv0.4.1 which usesedition = 2024, which isn't supported in our MSRV of 1.75.0.Here we replace the
proptest-based round-trip test with a simple loop usingrand(already a regular dependency) to generate random inputs. This removes a dev-dependency and its associated MSRV pin in CI.Co-Authored-By: HAL 9000