-
Notifications
You must be signed in to change notification settings - Fork 161
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
458 fix wasm #519
base: main
Are you sure you want to change the base?
458 fix wasm #519
Conversation
From a quick glance, looks good, although it's been open for a long time, so would be good to test it still works. |
#[cfg(feature = "std")] | ||
const MAX_SHRINK_ITERS: &str = "PROPTEST_MAX_SHRINK_ITERS"; | ||
#[cfg(feature = "std")] | ||
const MAX_DEFAULT_SIZE_RANGE: &str = "PROPTEST_MAX_DEFAULT_SIZE_RANGE"; |
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.
did this one get deleted on accident? i believe it's still in use in parse_or_warn
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.
Idk - it's been a very long time - but CI seems to pass?
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.
odd
Variable `MAX_DEFAULT_SIZE_RANGE` should have snake_case name, e.g. `max_default_size_range`
so arbitrary tokens in pattern match positions seem to be treated as new variable bindings and default to ()
, that's why this still compiles even though there's a warning.
i don't think i have push access to this branch though so @matthew-russo you'll need to update please
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.
Yeah this is fixed in #518
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.
so arbitrary tokens in pattern match positions seem to be treated as new variable bindings and default to (), that's why this still compiles even though there's a warning.
Hm but that doesn't explain why parse_or_warn
accepted it if it's ()
and used in an argument that expects &str
.
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.
pushed an updated commit that has this
Hides a few paths, that fail at runtime on wasm32-unknown-unknown, under conditional compilation. Fixes proptest-rs#137.
a105c7a
to
0585e03
Compare
replaces #458