Closed joshu-stripe closed 6 years ago
Thanks! Let me poke at why the OS X build has stalled. (Just to be clear, since I don't have a working OS X machine at the moment and you do, do the tests succeed locally on Go 1.5/1.6?)
I don’t think I have Go 1.5/1.6 installed on OS X, unfortunately :( If there’s an easy way to switch between Go versions, I could test it out though.
The release candidates of newer versions are go-gettable, but I don't think that had been introduced by 1.6.
The only failures appear to be Travis-related or due to overly-strict tests in the yaml library, and are only on 1.5 and 1.6. Once the tests on https://github.com/ChimeraCoder/gojson/pull/63 pass, I think rebasing this branch onto that one would fix it.
If absolutely we need to, I'm not terribly concerned with dropping support for those; 1.6 hasn't been supported by upstream for almost a year now. But I'd rather not if we can avoid it.
Good call! I’ll keep an eye on #63 and be ready to rebase off of it when the tests pass.
Travis has been down for several hours, so we'll have to wait until it's back. :)
Rebased onto #63
@joshu-stripe there's Travis weirdness here... you'll need to rebase this yourself in order for Travis to re-pull the correct branch.
Thanks for the update! I’ve rebased and re-pushed, and it looks like things are working now. ✅
Summary
This changes
gojson
’s behavior with YAML output so that it doesn’t try to infer whether YAML integers are floats.Also reformatted a docstring comment to appease the linter gods.
Motivation
Since YAML’s spec includes unambiguous tagging for integers and floats, we don’t need to use
disambiguateFloatInt
to turn whole numbers from floats to integers.Testing
Added tests for this behavior as well!
Hope this is helpful @ChimeraCoder – it unfortunately doesn’t really solve the problem of #44 :(