JuliaIO / JSON.jl

JSON parsing and printing
Other
313 stars 101 forks source link

Update Parsers support #327

Closed quinnj closed 3 years ago

quinnj commented 3 years ago

Update the Parsers compat versions to "1, 2". As of v1.0.5, Parsers.tryparse ensured the full input buffer was consumed when parsing a value (as mentioned desirable in the now-deleted comment in float_from_bytes). So dropping support for older Parsers versions allows us to trust Parsers.tryparse, and those pre-1.0 versions are pretty old at this point anyway.

I locally ran the JSON.jl tests under both Parsers v2.0.1 and v1.1.1 and ensured both were passing, so it shouldn't matter which version of Parsers ends up getting installed if there are other packages which don't 2.0 yet.

KristofferC commented 3 years ago

I locally ran the JSON.jl tests under both Parsers v2.0.1 and v1.1.1 and ensured both were passing,

CI seems to fail so perhaps there is some difference between your local state and CI?

KristofferC commented 3 years ago

Ah, I see https://github.com/JuliaData/Parsers.jl/pull/85 now.

quinnj commented 3 years ago

Yeah, it looks like @view bytes[to:from] isn't supported when bytes is a string either on 1.0.

codecov[bot] commented 3 years ago

Codecov Report

Merging #327 (b422e58) into master (1c24980) will decrease coverage by 0.02%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #327      +/-   ##
==========================================
- Coverage   99.53%   99.51%   -0.03%     
==========================================
  Files           7        5       -2     
  Lines         428      410      -18     
==========================================
- Hits          426      408      -18     
  Misses          2        2              
Impacted Files Coverage Δ
src/Parser.jl 100.00% <100.00%> (ø)
src/JSON.jl 100.00% <0.00%> (ø)
src/Common.jl
src/bytes.jl

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 1c24980...b422e58. Read the comment docs.

quinnj commented 3 years ago

Ok, this looks good now.