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

bump deps #73

Merged
merged 2 commits into from
Jun 21, 2022
Merged

bump deps #73

merged 2 commits into from
Jun 21, 2022

Conversation

mhuesch
Copy link
Contributor

@mhuesch mhuesch commented Jun 21, 2022

we've racked up a bunch of dependabot alerts b/c of using old versions of deps.

updating them helped my find a bug in the parser, so that's cool.

mhuesch added 2 commits June 20, 2022 13:34
now encountering an overflow error in the quickcheck properties:

```
<...>
thread 'test::parse_pretty::roundtrip::parse_pretty_roundtrip' panicked at 'called `Result::unwrap()` on an `Err` value: ParseIntError { kind: PosOverflow }', rep_lang_concrete_syntax/src/parse.rs:26:45
thread 'test::parse_pretty::roundtrip::parse_pretty_roundtrip' panicked at '[quickcheck] TEST FAILED (runtime error). Arguments: (WrappedExpr(Lit(LInt(-9223372036854775808))))
Error: "called `Result::unwrap()` on an `Err` value: ParseIntError { kind: PosOverflow }"', /home/mhueschen/.cargo/registry/src/github.ghproxy.top-1ecc6299db9ec823/quickcheck-1.0.3/src/tester.rs:165:28
```

it seems like `-(2 ^ 63)` is unable to be parsed into an i64 via
`string.parse::<i64>()`. which seems weird, because it should fit...
as discovered by the quickcheck properties - most excellent!

I was parsing negative numbers by registering the `-` token, then
parsing the following numeric characters as a postive i64. then, if
there was a `-` token, I would negate that postive number to make it
negative.

unfortunately this doesn't work for `minBound` of a 2s complement
representation...

i64 ranges from `-(2^63)` to `2^63 - 1`. `2^63` is not representable, so
we were getting the overflow error.
@mhuesch mhuesch merged commit d47f7a8 into main Jun 21, 2022
@mhuesch mhuesch deleted the bump_deps branch June 21, 2022 17:57
mhuesch added a commit that referenced this pull request Jun 21, 2022
rustyline changed since we updated deps in #73, so wasm builds broke.

this should restore them.
mhuesch added a commit that referenced this pull request Jun 21, 2022
work around lack of proper wasm support in rustyline. rustyline changed
since we updated deps in #73, so wasm builds broke.

solution:
- depend on kkawakam/rustyline#620 PR code
- fork PR branch s.t. it can't disappear on us
@mhuesch mhuesch mentioned this pull request Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant