Skip to content

Pin nlohmann_json to 3.12.0 #291

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

Merged
merged 6 commits into from
Apr 23, 2025

Conversation

mcbarton
Copy link
Collaborator

Description

Please include a summary of changes, motivation and context for this PR.

The latest release of xeus got released, and requires nlohmann_json to be 3.12.0 . Until this PR is in the ci will fail
(see https://github.com/compiler-research/xeus-cpp/actions/runs/14604191183/job/40969335106#step:5:97).

Fixes # (issue)

Type of change

Please tick all options which are relevant.

  • Bug fix
  • New feature
  • Added/removed dependencies
  • Required documentation updates

@mcbarton mcbarton changed the title Remove pin on nlohmann_json Pin xeus to 5.2.0 Apr 22, 2025
@codecov-commenter
Copy link

codecov-commenter commented Apr 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.15%. Comparing base (baf3bb7) to head (2998925).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #291   +/-   ##
=======================================
  Coverage   82.15%   82.15%           
=======================================
  Files          20       20           
  Lines         958      958           
  Branches       88       88           
=======================================
  Hits          787      787           
  Misses        171      171           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@anutosh491
Copy link
Collaborator

cc @JohanMabille this is actually related to what I was mentioning yesterday

Here the keyword REQUIRED is put to use (so building xeus would need anything above 3.11)
https://github.com/jupyter-xeus/xeus/blob/7e27db78137ab8678de28a06e70af1996e334e40/CMakeLists.txt#L78-L88

and here the keyword EXACT is put to use (building downstream projects would need exactly 3.12)
https://github.com/jupyter-xeus/xeus/blob/7e27db78137ab8678de28a06e70af1996e334e40/xeusConfig.cmake.in#L25C1-L27C61

Does this sound like a mismatch to you ?

@anutosh491
Copy link
Collaborator

anutosh491 commented Apr 23, 2025

I think we just need to remove the pins overall

Check : emscripten-forge/recipes#2270

Just remove both pins and we should be good

@mcbarton
Copy link
Collaborator Author

mcbarton commented Apr 23, 2025

I think we just need to remove the pins overall

Check : emscripten-forge/recipes#2270

Just remove both pins and we should be good

@anutosh491 @vgvassilev As said in my discord message I already tried this and it didn't work (see https://github.com/compiler-research/xeus-cpp/actions/runs/14604401760/job/40970026439?pr=291 ). That is the reason I pinned xeus as a temporary fix until the error with everything unpinned could be resolved.

@anutosh491
Copy link
Collaborator

anutosh491 commented Apr 23, 2025

There are differences!

Your commit uses xeus-lite 3.0.1 and the latest is 3.1.0

Please remove the pins and build again and we should be good I think !

Change the PR heading accordingly

@mcbarton mcbarton changed the title Pin xeus to 5.2.0 Remove pin on nlohmann_json Apr 23, 2025
@mcbarton
Copy link
Collaborator Author

There are differences!

Your commit uses xeus-lite 3.0.1 and the latest is 3.1.0

Please remove the pins and build again and we should be good I think !

Change the PR heading accordingly

@anutosh491 Done. I've also done the same to my PR in CppInterOp here compiler-research/CppInterOp#566 . Please approve both at the same time

@anutosh491
Copy link
Collaborator

Your pr still uses xeus 5.2.0 for the native case.

We technically need to unpin this too https://github.com/compiler-research/xeus-cpp/blob/main/environment-dev.yml#L12

which hasn't been done.

@mcbarton
Copy link
Collaborator Author

Your pr still uses xeus 5.2.0 for the native case.

We technically need to unpin this too https://github.com/compiler-research/xeus-cpp/blob/main/environment-dev.yml#L12

which hasn't been done.

Removed that pin too now

@anutosh491
Copy link
Collaborator

Not sure why are we still fetching 5.2.0 :(

image

@JohanMabille
Copy link
Collaborator

cc @JohanMabille this is actually related to what I was mentioning yesterday

Here the keyword REQUIRED is put to use (so building xeus would need anything above 3.11) https://github.com/jupyter-xeus/xeus/blob/7e27db78137ab8678de28a06e70af1996e334e40/CMakeLists.txt#L78-L88

and here the keyword EXACT is put to use (building downstream projects would need exactly 3.12) https://github.com/jupyter-xeus/xeus/blob/7e27db78137ab8678de28a06e70af1996e334e40/xeusConfig.cmake.in#L25C1-L27C61

Does this sound like a mismatch to you ?

It is not a mismatch. Xeus can work with any version compatible with 3.11, so we require 3.11. Any downstream project that will exchange json objects with xeus needs to be built with the same version as the one used to build xeus for ABI compatibility reasons.

The pinning on nlohmann_json ensures this; otherwise, you may endup downloading a newer version of nolhmann_json from conda-forge and notive the failure at build time only. Therefore, this pinning should not be removed, but updated to that used to build xeus.

A better solution would be a global pinning on conda-forge, but we don't have it for now.

@anutosh491
Copy link
Collaborator

Therefore, this pinning should not be removed, but updated to that used to build xeus.

Yes this might be the way forward. Let's pin it to 3.12.0 for now

@mcbarton mcbarton changed the title Remove pin on nlohmann_json Pin nlohmann_json to 3.12.0 Apr 23, 2025
@mcbarton
Copy link
Collaborator Author

mcbarton commented Apr 23, 2025

Therefore, this pinning should not be removed, but updated to that used to build xeus.

Yes this might be the way forward. Let's pin it to 3.12.0 for now

@anutosh491 Done, but this doesn't work for the native build, and probably explains why xeus wouldn't upgrade to 5.2.1 for the native build when unpinned.

@anutosh491
Copy link
Collaborator

Done.

Ahh I think the error calls for building xeus-zmq with the latest xeus which hasn't been done. Looking into it !

Copy link
Collaborator

@anutosh491 anutosh491 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now ready. Thanks !

@anutosh491 anutosh491 merged commit 1158ecd into compiler-research:main Apr 23, 2025
16 of 26 checks passed
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.

4 participants