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

Fix compatibility with nlohmann-json 3.9.1 #4040

Merged
merged 1 commit into from Sep 22, 2020

Conversation

OmnipotentEntity
Copy link
Contributor

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.

@Ericson2314
Copy link
Member

This looks good, except we should find a way to reduplicate the override in the flake.nix.

@cole-h
Copy link
Member

cole-h commented Sep 19, 2020

@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 throw here; should this be done, or is a return true; fine?

EDIT: And also, maybe the commit title should be Fix compatibility with nlohmann-json 3.9.1 or something?

@OmnipotentEntity OmnipotentEntity changed the title Bump nlohmann-json version to 3.9.1 Fix compatibility with nlohmann-json 3.9.1 Sep 21, 2020
@Ericson2314
Copy link
Member

Ericson2314 commented Sep 21, 2020

Also, I'm thinking @matthewbauer is right we should throw, otherwise we could silently drop a field or something.

@OmnipotentEntity
Copy link
Contributor Author

OmnipotentEntity commented Sep 21, 2020 via email

@edolstra
Copy link
Member

Yes, assert(false) sounds good.

@OmnipotentEntity
Copy link
Contributor Author

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.

@OmnipotentEntity
Copy link
Contributor Author

Now that CI has had a chance to chew through it, I've pushed the version without the changes to flake.nix.

@edolstra edolstra merged commit e7f1109 into NixOS:master Sep 22, 2020
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.

None yet

4 participants