[ci] Use C++20 also in the nightly build with cmake_cxxmodules=OFF#20989
[ci] Use C++20 also in the nightly build with cmake_cxxmodules=OFF#20989guitargeek wants to merge 1 commit intoroot-project:masterfrom
cmake_cxxmodules=OFF#20989Conversation
This avoids surprises where fragile test failures with C++17 and
modules=OFF cannot be anticipated from the PR builds.
The test in question is in `test_datatypes.py` in the cppyy test suite:
```txt
=================================== FAILURES ===================================
____________________ TestDATATYPES.test49_addressof_method _____________________
self = <test.test_datatypes.TestDATATYPES object at 0x7fb5a77f3200>
@mark.xfail(strict=True, condition=IS_MAC_ARM or IS_WINDOWS, reason="Crashes on mac-beta ARM64 and fails on Windows")
def test49_addressof_method(self):
"""Use of addressof for (const) methods"""
import cppyy
> assert cppyy.addressof(cppyy.gbl.std.vector[int].at.__overload__(':any:', False))
E AssertionError: assert 0
E + where 0 = <built-in function addressof>(<cppyy.CPPOverload object at 0x7fb5a7a62000>)
E + where <built-in function addressof> = <module 'cppyy' from '/github/home/ROOT-CI/build/lib/cppyy/__init__.py'>.addressof
E + and <cppyy.CPPOverload object at 0x7fb5a7a62000> = <built-in method __overload__ of cppyy.CPPOverload object at 0x7fb5a7aaaa00>(':any:', False)
E + where <built-in method __overload__ of cppyy.CPPOverload object at 0x7fb5a7aaaa00> = <cppyy.CPPOverload object at 0x7fb5a7aaaa00>.__overload__
E + where <cppyy.CPPOverload object at 0x7fb5a7aaaa00> = <class cppyy.gbl.std.vector<int> at 0x5628463dfb40>.at
../../../../../../src/bindings/pyroot/cppyy/cppyy/test/test_datatypes.py:2348: AssertionError
----------------------------- Captured stderr call -----------------------------
input_line_412:2:106: error: 'RActivePhysicalColumns' is a protected member of 'ROOT::Internal::RPageSource'
(vector<int>::reference (std::vector<int, std::allocator<int> >::*)(vector<ROOT::Internal::RPageSource::RActivePhysicalColumns::RColumnInfo>::size_type))&std::vector<int, std::allocator<int> >::at
^
/github/home/ROOT-CI/build/include/ROOT/RPageStorage.hxx:653:10: note: declared protected here
class RActivePhysicalColumns {
^
=========================== short test summary info ============================
```
|
This implements a suggestion by @dpiparo made in #20980 (comment) |
Test Results 22 files 22 suites 3d 13h 24m 17s ⏱️ Results for commit efd3c2d. ♻️ This comment has been updated with latest results. |
Isn't that a platform we support though? (i.e. should both be in the PR builds). [Related: is the issue on our side or is it a compiler bug?] |
|
To me, this looks like a compiler or cling issue. I mean it's pretty crazy that this test... def test49_addressof_method(self):
"""Use of addressof for (const) methods"""
import cppyy
assert cppyy.addressof(cppyy.gbl.std.vector[int].at.__overload__(':any:', False))
assert cppyy.addressof(cppyy.gbl.std.vector[int].at.__overload__(':any:', True))...fails with this error: error: 'RActivePhysicalColumns' is a protected member of 'ROOT::Internal::RPageSource'It's worth to open a GitHub issue about it I guess. I'll do that later. |
|
I opened a GitHub issue about this, and also suggested a more conservative alternative to this PR, where the offending tests is not run in the specific configuration where it fails: |
This avoids surprises where fragile test failures with C++17 and modules=OFF cannot be anticipated from the PR builds.
The test in question is in
test_datatypes.pyin the cppyy test suite:=================================== FAILURES =================================== ____________________ TestDATATYPES.test49_addressof_method _____________________ self = <test.test_datatypes.TestDATATYPES object at 0x7fb5a77f3200> @mark.xfail(strict=True, condition=IS_MAC_ARM or IS_WINDOWS, reason="Crashes on mac-beta ARM64 and fails on Windows") def test49_addressof_method(self): """Use of addressof for (const) methods""" import cppyy > assert cppyy.addressof(cppyy.gbl.std.vector[int].at.__overload__(':any:', False)) E AssertionError: assert 0 E + where 0 = <built-in function addressof>(<cppyy.CPPOverload object at 0x7fb5a7a62000>) E + where <built-in function addressof> = <module 'cppyy' from '/github/home/ROOT-CI/build/lib/cppyy/__init__.py'>.addressof E + and <cppyy.CPPOverload object at 0x7fb5a7a62000> = <built-in method __overload__ of cppyy.CPPOverload object at 0x7fb5a7aaaa00>(':any:', False) E + where <built-in method __overload__ of cppyy.CPPOverload object at 0x7fb5a7aaaa00> = <cppyy.CPPOverload object at 0x7fb5a7aaaa00>.__overload__ E + where <cppyy.CPPOverload object at 0x7fb5a7aaaa00> = <class cppyy.gbl.std.vector<int> at 0x5628463dfb40>.at ../../../../../../src/bindings/pyroot/cppyy/cppyy/test/test_datatypes.py:2348: AssertionError ----------------------------- Captured stderr call ----------------------------- input_line_412:2:106: error: 'RActivePhysicalColumns' is a protected member of 'ROOT::Internal::RPageSource' (vector<int>::reference (std::vector<int, std::allocator<int> >::*)(vector<ROOT::Internal::RPageSource::RActivePhysicalColumns::RColumnInfo>::size_type))&std::vector<int, std::allocator<int> >::at ^ /github/home/ROOT-CI/build/include/ROOT/RPageStorage.hxx:653:10: note: declared protected here class RActivePhysicalColumns { ^ =========================== short test summary info ============================