Skip to content

ROOT: new versions with associated dependency constraints#34185

Merged
sethrj merged 12 commits intospack:developfrom
HadrienG2:root-updates
Dec 6, 2022
Merged

ROOT: new versions with associated dependency constraints#34185
sethrj merged 12 commits intospack:developfrom
HadrienG2:root-updates

Conversation

@HadrienG2
Copy link
Copy Markdown
Contributor

@wdconinc Here's my take on the dependency constraints, so that the info on your closed PR don't get lost :)

I couldn't spell out the macOS conflict because I don't have access to a Mac so I can't check how macOS fills uname information.

Feel free to test/approve this once you have the time.

@wdconinc
Copy link
Copy Markdown
Contributor

As commented here (simultaneously to this PR), doesn't it make more sense to have this modeled as closed-ended dependencies rather than open-ended dependencies with conflicts? That would avoid 'automatically' allowing for example new major python versions when they come out even for older ROOT versions. It would 'pin' the dependencies to a known major version until a certain ROOT version that has consciously added support for it.

@HadrienG2
Copy link
Copy Markdown
Contributor Author

HadrienG2 commented Nov 29, 2022

I'm not sure about full close-ended dependencies because it introduces significant extra maintenance effort where most dependency updates are actually harmless. But I pushed a version that avoids conflicts where possible in favor of version dependency constraints (as far as I know, it's not currently possible to avoid conflicts for OS and compiler constraints).

@HadrienG2
Copy link
Copy Markdown
Contributor Author

...and using https://stackoverflow.com/questions/1777344/how-to-detect-mac-os-version-using-python as a template, I added a conflict for macOS 13+ on older ROOT, though again I cannot test it due to lack of suitable hardware.

@vvolkl
Copy link
Copy Markdown
Contributor

vvolkl commented Nov 29, 2022

Spack already knows the macOS version, it's probably easier to just call spack.operating_systems.mac_os.macos_version than deal with platform

Also, I'm currently trying to get macOS builds to work for key4hep, I can do some testing on our build machines.

@HadrienG2
Copy link
Copy Markdown
Contributor Author

HadrienG2 commented Nov 29, 2022

That looks interesting, but in typical Python API documentation fashion, the docs claim that this function returns a "version object" without clarifying how such an object is actually constructed or used...

@HadrienG2
Copy link
Copy Markdown
Contributor Author

...oh, well, let's just copy-paste an incantation from another package that uses that API and hope that it's correct 🤷

@wdconinc
Copy link
Copy Markdown
Contributor

Tested that this builds correctly on my system for 6.26.10, with the following variants:

4fmb3qq [email protected]~aqua~arrow+davix~dcache~emacs+examples~fftw~fits~fortran+gdml+gminimal~graphviz+gsl+http~ipo~jemalloc+math~memstat+minuit~mlp~mysql+opengl~oracle~postgres~pythia6~pythia8+python~qt4~r+roofit+root7+rpath~shadow~spectrum~sqlite+ssl~table+tbb+threads~tmva+unuran+vc+vdt+veccore~vmc~webgui+x+xml+xrootd build_system=cmake build_type=RelWithDebInfo cxxstd=17 patches=22af347,89294c4

(89294c4 is a local patch; system is gcc@12; relevant dependency: [email protected])

@HadrienG2
Copy link
Copy Markdown
Contributor Author

Then let's undraft this.

@HadrienG2 HadrienG2 marked this pull request as ready for review November 30, 2022 06:22
@tldahlgren
Copy link
Copy Markdown
Contributor

Looks like some pod-related issues with one of the pipeline stacks:

Waiting for pod pipeline/runner-k3q2udsw-project-2-concurrent-349nrm to be running, status is Pending
	ContainersNotInitialized: "containers with incomplete status: [init-permissions]"
	ContainersNotReady: "containers with unready status: [build helper]"
	ContainersNotReady: "containers with unready status: [build helper]"
Running on runner-k3q2udsw-project-2-concurrent-349nrm via x86-v2-pub-gitlab-runner-7684c89569-5zzvv...

@spackbot run pipeline

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Nov 30, 2022

I've started that pipeline for you!

@tldahlgren
Copy link
Copy Markdown
Contributor


# Python
depends_on("[email protected]:", when="+python", type=("build", "run"))
depends_on("[email protected]:3.10", when="@:6.26.09 +python", type=("build", "run"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be a conflict indicating an issue with newer pythons on older ROOT? I'm not sure it makes a difference to the concretizer these days, but semantically it might be more appropriate.

Copy link
Copy Markdown
Contributor Author

@HadrienG2 HadrienG2 Dec 1, 2022

Choose a reason for hiding this comment

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

Historically, one difference between this syntax and conflicts has been that in the conflict case, the spack concretizer would not try older dependency versions and just give up stating that there is a conflict. If you are telling me that this is not an issue anymore with newer spack versions, I can turn those back into conflicts.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The new concretizer is not "greedy" like the old one, so I think it should work. The real expert is @alalazo who could perhaps share some insight into best practices here?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In general it's better to add "positive" directives like done here. Conflicts add penalties to our minimization and they might trigger more easily weird situations where, to avoid the penalty, Spack turns off some other default.

sethrj
sethrj previously approved these changes Dec 2, 2022
Copy link
Copy Markdown
Contributor

@sethrj sethrj left a comment

Choose a reason for hiding this comment

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

I successfully installed 6.26.10 on macOS 13.

@alalazo
Copy link
Copy Markdown
Member

alalazo commented Dec 5, 2022

There's a conflict to be solved here

@sethrj
Copy link
Copy Markdown
Contributor

sethrj commented Dec 5, 2022

The conflict was my bad (#34244) so I've fixed it.

@sethrj
Copy link
Copy Markdown
Contributor

sethrj commented Dec 5, 2022

@tldahlgren would you mind checking the box for a second reviewer? Since I added a commit it won't accept my review to qualify for merge.

Copy link
Copy Markdown
Contributor

@tldahlgren tldahlgren left a comment

Choose a reason for hiding this comment

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

LGTM

@sethrj sethrj enabled auto-merge (squash) December 5, 2022 23:10
@sethrj sethrj changed the title New root versions with associated dependency constraints ROOT: new versions with associated dependency constraints Dec 5, 2022
@sethrj
Copy link
Copy Markdown
Contributor

sethrj commented Dec 6, 2022

@spackbot run ci

@sethrj
Copy link
Copy Markdown
Contributor

sethrj commented Dec 6, 2022

@spackbot run pipeline

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Dec 6, 2022

I've started that pipeline for you!

@sethrj sethrj merged commit 559c3de into spack:develop Dec 6, 2022
amd-toolchain-support pushed a commit to amd-toolchain-support/spack that referenced this pull request Feb 16, 2023
* Add new root versions and associated dependency constraints

* Please style guide

* Avoid conflicts where possible

* Untested prototype of macOS version detection

* Fixes for macOS version prototype

* More logical ordering

* More correctness and style fixes

* Try to use spack's macos_version

* Add some forgotten @s

* Actually, Spack can't build Python 3.6 anymore, and thus no older PyROOT

Co-authored-by: Seth R. Johnson <[email protected]>
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.

6 participants