-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
"self.run_tests" attribute masked by the object wrapper #34518
Comments
I was trying to reproduce this problem on my macbook, and for some reason it seems to work fine on macOS. Shall I try to make a reproducible example? |
This simple example works on macOS and fails on Linux:
On Linux:
On macOS:
|
The issue is due to this line: spack/lib/spack/spack/installer.py Line 1276 in 55356e9
which monkey patches an object that was used, before monkey patching, to create and cache a builder. The wrapping is done here: spack/lib/spack/spack/builder.py Line 130 in 55356e9
|
fixes spack#34518 Fix an issue due to the MRO chain of the package wrapper during build. Before this PR we were always returning False when the builder object was created before the run_tests method was monkey patched.
On the difference between macOS and linux, those are likely due to the different strategies used to create the separate process to install a spec. On macOS we use |
fixes #34518 Fix an issue due to the MRO chain of the package wrapper during build. Before this PR we were always returning False when the builder object was created before the run_tests method was monkey patched.
fixes spack#34518 Fix an issue due to the MRO chain of the package wrapper during build. Before this PR we were always returning False when the builder object was created before the run_tests method was monkey patched.
fixes #34518 Fix an issue due to the MRO chain of the package wrapper during build. Before this PR we were always returning False when the builder object was created before the run_tests method was monkey patched.
fixes #34518 Fix an issue due to the MRO chain of the package wrapper during build. Before this PR we were always returning False when the builder object was created before the run_tests method was monkey patched.
fixes #34518 Fix an issue due to the MRO chain of the package wrapper during build. Before this PR we were always returning False when the builder object was created before the run_tests method was monkey patched.
fixes #34518 Fix an issue due to the MRO chain of the package wrapper during build. Before this PR we were always returning False when the builder object was created before the run_tests method was monkey patched.
fixes #34518 Fix an issue due to the MRO chain of the package wrapper during build. Before this PR we were always returning False when the builder object was created before the run_tests method was monkey patched.
fixes #34518 Fix an issue due to the MRO chain of the package wrapper during build. Before this PR we were always returning False when the builder object was created before the run_tests method was monkey patched.
fixes spack#34518 Fix an issue due to the MRO chain of the package wrapper during build. Before this PR we were always returning False when the builder object was created before the run_tests method was monkey patched.
Steps to reproduce
Originally reported by @rbberger in https://spackpm.slack.com/archives/C5VL7V81G/p1669578286178559
Classes that try to use
self.run_tests
to set any custom attribute and are not using builders will see this attribute set toFalse
due to the object wrapper.Error message
No error message, just unexpected behavior.
Information on your system
General information
spack debug report
and reported the version of Spack/Python/PlatformThe text was updated successfully, but these errors were encountered: