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

nlohmann_json: 3.7.3 -> 3.9.1 #97266

Merged
merged 1 commit into from Dec 11, 2020
Merged

Conversation

colemickens
Copy link
Member

Motivation for this change

Updates nlohmann_json to latest stable. (Latest nwg-launchers needs a newer version)

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • IN PROGRESS Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@colemickens
Copy link
Member Author

Looks like I'm late to the game here, since there's #90637

cc: @matthewbauer since it looks like you're carrying related commits maybe, in an ipfs branch.

@OmnipotentEntity
Copy link
Contributor

I'm pretty familiar with this particular library. So feel free to hit me up as a resource if needed.

@bbigras
Copy link
Contributor

bbigras commented Sep 14, 2020

Looks like I'm late to the game here, since there's #90637

Shouldn't that PR just be superseded by yours since yours has a newer version?

@bbigras
Copy link
Contributor

bbigras commented Sep 14, 2020

Not sure if it's only on my side and why so much stuff is built.

❯ nix-review pr 97266
$ git -c fetch.prune=false fetch --force https://github.com/NixOS/nixpkgs master:refs/nixpkgs-review/0 pull/97266/head:refs/nixpkgs-review/1
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Total 17 (delta 10), reused 10 (delta 10), pack-reused 7
Dépaquetage des objets: 100% (17/17), 4.92 Kio | 1.23 Mio/s, fait.
Depuis https://github.com/NixOS/nixpkgs
   16f13a9cad5..24fa210e772  master     -> refs/nixpkgs-review/0
$ git worktree add /home/bbigras/.cache/nixpkgs-review/pr-97266-1/nixpkgs 24fa210e772351f118e5f56e5acbe5eaea38a95f
Préparation de l'arbre de travail (HEAD détachée 24fa210e772)
Mise à jour des fichiers: 100% (22686/22686), fait.
HEAD est maintenant à 24fa210e772 rclone: 1.53.0 -> 1.53.1 (#97953)
$ git merge --no-commit bf437947b3ac030bab21422b7683c770f034b074
La fusion automatique a réussi ; stoppée avant la validation comme demandé
$ nix build --no-link --keep-going --option build-use-sandbox relaxed -f /home/bbigras/.cache/nixpkgs-review/pr-97266-1/build.nix
builder for '/nix/store/l0g3jd7p8g15fm0l26x40xaf6ii2684b-python3.7-nixpkgs-0.2.4.drv' failed with exit code 1; last 10 log lines:
      import nix
  ModuleNotFoundError: No module named 'nix'


  ----------------------------------------------------------------------
  Ran 1 test in 0.000s

  FAILED (errors=1)
  Test failed: <unittest.runner.TextTestResult run=1 errors=1 failures=0>
  error: Test failed: <unittest.runner.TextTestResult run=1 errors=1 failures=0>
builder for '/nix/store/6lq9d35ck9r5y4li9dzpfccq0fh2hap0-nix-exec-4.1.6.drv' failed with exit code 2; last 10 log lines:
                   from /nix/store/vf648zy80rjib10pv5jqq8mhcap7fhgm-nix-2.3.7-dev/include/nix/value.hh:3,
                   from /nix/store/vf648zy80rjib10pv5jqq8mhcap7fhgm-nix-2.3.7-dev/include/nix/nixexpr.hh:3,
                   from /nix/store/vf648zy80rjib10pv5jqq8mhcap7fhgm-nix-2.3.7-dev/include/nix/attr-set.hh:3,
                   from /nix/store/vf648zy80rjib10pv5jqq8mhcap7fhgm-nix-2.3.7-dev/include/nix/eval.hh:3,
                   from src/fetchgit.cc:15:
  /nix/store/vf648zy80rjib10pv5jqq8mhcap7fhgm-nix-2.3.7-dev/include/nix/types.hh:12:10: fatal error: boost/format.hpp: No such file or directory
     12 | #include <boost/format.hpp>
        |          ^~~~~~~~~~~~~~~~~~
  compilation terminated.
  make: *** [Makefile:691: src/libfetchgit_la-fetchgit.lo] Error 1
builder for '/nix/store/cd3a1sxaq9idl129bvgbgrazpfnpp792-nix-3.0pre20200829_f156513.drv' failed with exit code 2; last 10 log lines:
                   from src/libexpr/json-to-value.cc:4:
  /nix/store/a15crh4aa98283pmx0gxzchgi39547qf-nlohmann_json-3.9.1/include/nlohmann/detail/input/json_sax.hpp:80:18: note: declared here
     80 |     virtual bool binary(binary_t& val) = 0;
        |                  ^~~~~~
  In file included from /nix/store/a15crh4aa98283pmx0gxzchgi39547qf-nlohmann_json-3.9.1/include/nlohmann/json.hpp:55,
                   from src/libexpr/json-to-value.cc:4:
  /nix/store/a15crh4aa98283pmx0gxzchgi39547qf-nlohmann_json-3.9.1/include/nlohmann/detail/input/binary_reader.hpp:289:113: error: 'nlohmann::json_sax<nlohmann::basic_json<> >' is not an accessible base of 'nlohmann::detail::binary_reader<nlohmann::basic_json<>, nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> > >, nix::JSONSax>::json_sax_t' {aka 'nix::JSONSax'}
    289 |                 return get_number<std::int32_t, true>(input_format_t::bson, len) && get_bson_binary(len, value) && sax->binary(value);
  make: *** [mk/patterns.mk:2: src/libexpr/json-to-value.o] Error 1
  make: *** Waiting for unfinished jobs....
cannot build derivation '/nix/store/yl953psrx2ngzfmrd0yawp9glbrfizx9-disnix-0.9.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/2si6ypvvj2n5kn8jqz1qdy9izfr74qk1-nix-perl-3.0pre20200829_f156513.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/fawybhvrxw8ysqlfkadvm79yv321fral-disnixos-0.8.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/40f287q2yz7p6y373lcqambivkvqqx7y-hydra-perl-deps.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/6qzllqc1jk2rgcap1nbsxaqcadda49z1-hydra-2020-09-02.drv': 2 dependencies couldn't be built
cannot build derivation '/nix/store/yjfss0fkyrmvyggcbmr77hdvk7clkf4j-env.drv': 6 dependencies couldn't be built
[0 built (3 failed)]
error: build of '/nix/store/yjfss0fkyrmvyggcbmr77hdvk7clkf4j-env.drv' failed
https://github.com/NixOS/nixpkgs/pull/97266
2 packages blacklisted:
tests.nixos-functions.nixos-test tests.nixos-functions.nixosTest-test

6 packages failed to build:
disnix disnixos hydra-unstable nix-exec nixFlakes python37Packages.nixpkgs

66 packages built:
bundix cabal2nix cachix common-updater-scripts cpp-ipfs-api crystal2nix dep2nix fusionInventory giada go2nix haskellPackages.cachix haskellPackages.hercules-ci-agent haskellPackages.hocker haskellPackages.nix-paths hercules-ci-agent hydra-migration lispPackages.quicklisp-to-nix lispPackages.quicklisp-to-nix-system-info mtxclient nheko nix nix-bundle nix-direnv nix-doc nix-du nix-index nix-pin nix-plugins nix-prefetch nix-prefetch-bzr nix-prefetch-cvs nix-prefetch-docker nix-prefetch-git nix-prefetch-hg nix-prefetch-scripts nix-prefetch-svn nix-serve nix-update nix-update-source nixos-generators nixos-shell nixpkgs-review nixui nlohmann_json nwg-launchers poedit python27Packages.nix-kernel python37Packages.nix-kernel python37Packages.pythonix python37Packages.qasm2image python37Packages.qiskit python37Packages.qiskit-aer python37Packages.qiskit-aqua python37Packages.qiskit-ignis python38Packages.nix-kernel python38Packages.nixpkgs python38Packages.pythonix python38Packages.qasm2image python38Packages.qiskit python38Packages.qiskit-aer python38Packages.qiskit-aqua python38Packages.qiskit-ignis sycl-info toxvpn vgo2nix vulnix

[0.0 MiB DL]
error: build log of '/nix/store/yl953psrx2ngzfmrd0yawp9glbrfizx9-disnix-0.9.1.drv' is not available
[0.0 MiB DL]
error: build log of '/nix/store/fawybhvrxw8ysqlfkadvm79yv321fral-disnixos-0.8.drv' is not available
[0.0 MiB DL]
error: build log of '/nix/store/6qzllqc1jk2rgcap1nbsxaqcadda49z1-hydra-2020-09-02.drv' is not available
[0.0 MiB DL]
error: build log of '/nix/store/852rd4p0dd86arkpxh6g4m50djkldfbi-nixos-system-nixos-test.drv' is not available
[0.0 MiB DL]
error: build log of '/nix/store/yihg7isr47154yhsikx65pmg16wbbm8i-vm-test-run-nixosTest-test.drv' is not available
$ nix-shell /home/bbigras/.cache/nixpkgs-review/pr-97266-1/shell.nix

@OmnipotentEntity
Copy link
Contributor

So one build failure with this PR seems to be changes within the library to support binary types in binary formats not being implemented on nix's side. This is literally my fault, (as I was the one who implemented this in the json library).

I'll submit a PR to nix to try to fix this.

@OmnipotentEntity
Copy link
Contributor

nix tracking issue: NixOS/nix#4019

@OmnipotentEntity
Copy link
Contributor

Nix has been patched. Just need to patiently wait for the nix patch to make it to a release, or need to include it as a patch in this PR. NixOS/nix#4040

@IvarWithoutBones
Copy link
Member

Anything blocking this from getting merged?

@OmnipotentEntity
Copy link
Contributor

OmnipotentEntity commented Nov 4, 2020

The latest nix release (13 days ago) does not seem to have the patch I issued. Nor does it seem to use nlohmann_json at all. But the patch is still in master.

I assume when nix updates their json support via a cherry-pick it will work. And ofborg seems green. So I don't think there's anything blocking.

@SuperSandro2000
Copy link
Member

Can someone with a beefy machine run nixpkgs-review on this?

@IvarWithoutBones IvarWithoutBones mentioned this pull request Dec 2, 2020
10 tasks
@IvarWithoutBones
Copy link
Member

IvarWithoutBones commented Dec 2, 2020

Result of nixpkgs-review pr 97266 run on x86_64-linux 1

5 packages marked as broken and skipped:
  • hydra-migration
  • nix-exec
  • python27Packages.nix-kernel
  • python37Packages.qasm2image
  • python38Packages.qasm2image
2 packages blacklisted:
  • tests.nixos-functions.nixos-test
  • tests.nixos-functions.nixosTest-test
6 packages failed to build:
  • fusionInventory
  • python37Packages.nixpkgs
  • python38Packages.qiskit
  • python38Packages.qiskit-aer
  • python38Packages.qiskit-aqua
  • python38Packages.qiskit-ignis
61 packages built:
  • bundix
  • cabal2nix
  • cachix
  • common-updater-scripts
  • cpp-ipfs-api
  • crystal2nix
  • dep2nix
  • disnix
  • disnixos
  • giada
  • go2nix
  • haskellPackages.cachix
  • haskellPackages.hercules-ci-agent
  • haskellPackages.hocker
  • haskellPackages.nix-paths
  • hercules-ci-agent
  • hydra-unstable
  • lispPackages.quicklisp-to-nix
  • lispPackages.quicklisp-to-nix-system-info
  • mtxclient
  • nheko
  • nix (nixStable)
  • nix-bundle
  • nix-direnv
  • nix-doc
  • nix-du
  • nix-index
  • nix-pin
  • nix-plugins
  • nix-prefetch
  • nix-prefetch-bzr
  • nix-prefetch-cvs
  • nix-prefetch-docker
  • nix-prefetch-git
  • nix-prefetch-hg
  • nix-prefetch-scripts
  • nix-prefetch-svn
  • nix-serve
  • nix-update
  • nix-update-source
  • nixFlakes (nixUnstable)
  • nixos-generators
  • nixos-shell
  • nixpkgs-review
  • nixui
  • nlohmann_json
  • nwg-launchers
  • poedit
  • python37Packages.nix-kernel
  • python37Packages.pythonix
  • python37Packages.qiskit
  • python37Packages.qiskit-aer
  • python37Packages.qiskit-aqua
  • python37Packages.qiskit-ignis
  • python38Packages.nix-kernel
  • python38Packages.nixpkgs
  • python38Packages.pythonix
  • sycl-info
  • toxvpn
  • vgo2nix
  • vulnix

All failing packages seem to be failing on hydra as well, so i think this should be good to merge @SuperSandro2000.

@SuperSandro2000 SuperSandro2000 merged commit d68e9a7 into NixOS:master Dec 11, 2020
@colemickens colemickens deleted the nlohmann_json branch December 30, 2022 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants