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
Fix compatibility with nlohmann-json 3.9.1 #4040
Conversation
This looks good, except we should find a way to reduplicate the override in the flake.nix. |
@Ericson2314 I don't think the overrides are intended to be permanent -- they only exist to show that this fixes the build with nlohmann::json 3.9.1, since the 3.9.1 update has not been merged in Nixpkgs yet ("I overrode the json version here to demonstrate functionality"). cc @matthewbauer -- You suggested using a EDIT: And also, maybe the commit title should be |
Also, I'm thinking @matthewbauer is right we should throw, otherwise we could silently drop a field or something. |
A binary value can only be generated from reading specific binary types,
such as BSON or CBOR. If you are only reading plain JSON then this is
properly unreachable code. I'm not familiar with how nix uses json though.
If this is the case would it be better to throw or assert(false)?
…On Mon, Sep 21, 2020, 10:45 John Ericson ***@***.***> wrote:
Also, I'm thinking @matthewbauer <https://github.com/matthewbauer> is
right we should through, otherwise we could silently drop a field or
something.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#4040 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALXUPVZWT5EWNC7QAAQXZ3SG5RKPANCNFSM4RTB6YCA>
.
|
Yes, |
f823c5a
to
34f8c70
Compare
Alright, that's changed. Again, the purpose of overriding nlohmann_json is merely to prove that it works under the newest json version. I will be reverting that change, because nix shouldn't be tied to an explicit json version. |
34f8c70
to
d860295
Compare
Now that CI has had a chance to chew through it, I've pushed the version without the changes to flake.nix. |
This is intended to fix NixOS/nixpkgs#97266 and #4019
However, this is my first time submitting a PR to this repo, and in this manner, so please be patient with me. I'm willing to work at it until it becomes right. The upside is it is a very small PR.
Because this issue is between an incompatibility between nixpkgs and nix, I overrode the json version here to demonstrate functionality. However, simply having the
binary
function ought not cause any issues for json version 3.7.3. Once this PR becomes ready to accept I can and expect to remove them.