Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(formatting/#2820): Range overflow when parsing ranges from extens…
…ion host __Issue:__ Onivim 2 wasn't correctly handling ranges from the extension host that were created with `Number.MAX_VALUE` (or, any value with any exponent...). A `ParseFailedException("Expected null or:\n while decoding a list:\n element 0:\n in field \"range\":\n in field \"endColumn\":\n Expected an int, but got 1.7976931248623157e+308\n".` was being produced. __Defect:__ Our JSON parsing was only handling integers __Fix:__ Use the `float` JSON decoder, which does handle exponents, and cast to an `int` - handling overflows. This fixes the parse failure, and allows for some basic formatting - but I'm still seeing some quirks with the ReScript formatter, when updating the buffer and running the formatter again. Related #2820
- Loading branch information