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

[core] Remove backports of C++17 features #13993

Merged
merged 4 commits into from
Nov 1, 2023

Conversation

guitargeek
Copy link
Contributor

@guitargeek guitargeek commented Nov 1, 2023

Remove the std::string_view backport and others, because it's not necessary anymore since the minimum C++ standard is now C++17.

@guitargeek guitargeek self-assigned this Nov 1, 2023
@guitargeek guitargeek changed the title [core] Remove std::string_view backport [core] Remove backports of C++17 features Nov 1, 2023
@vgvassilev
Copy link
Member

Thank you for cleaning up that mess!

Copy link
Member

@Axel-Naumann Axel-Naumann left a comment

Choose a reason for hiding this comment

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

Excellent, thanks for doing this! See comments, please! And let's make sure that the CI passes before merging :-)

@@ -1,591 +0,0 @@
// -*- C++ -*-
Copy link
Member

Choose a reason for hiding this comment

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

GitHub tells me that this file got emptied but isn't deleted. Is that intentional? Or a bug in GitHub's interface?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gh_iface_bug

For me it shows it like this, so correctly deleted. Maybe a bug in the comparison interface

@@ -1,824 +0,0 @@
// -*- C++ -*-
Copy link
Member

Choose a reason for hiding this comment

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

Same here: empty but file remains?

@@ -309,15 +309,8 @@ friend std::strong_ordering operator<=>(const TString &s1, const TString &s2) {

// Type conversion
operator const char*() const { return GetPointer(); }
#if (__cplusplus >= 201700L) && !defined(_MSC_VER) && (!defined(__clang_major__) || __clang_major__ > 5)
Copy link
Member

Choose a reason for hiding this comment

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

How certain are we that Windows doesn't need this anymore? I guess the CI will tell...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, it's still needed. I don't like that it's there, but that would be another story

#ifdef R__HAS_STD_STRING_VIEW
#ifndef R__CUDA_HAS_STD_STRING_VIEW
#undef R__HAS_STD_STRING_VIEW
#define R__HAS_STD_EXPERIMENTAL_STRING_VIEW
Copy link
Member

Choose a reason for hiding this comment

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

Isn't anything using these preprocessor defines?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My gut feeling here is "pretty sure", but maybe @lmoneta can also comment

Copy link
Member

Choose a reason for hiding this comment

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

I think these are not needed anymore. There were there to fix conflict happening in past Cuda version when including string_view backport

Copy link
Member

Choose a reason for hiding this comment

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

Do we have any CUDA build in the CI?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

No, we don't have it!

guitargeek added a commit to guitargeek/roottest that referenced this pull request Nov 1, 2023
Copy link

github-actions bot commented Nov 1, 2023

Test Results

         9 files           9 suites   1d 10h 48m 12s ⏱️
  2 444 tests   2 444 ✔️ 0 💤 0
21 837 runs  21 837 ✔️ 0 💤 0

Results for commit 671be60.

♻️ This comment has been updated with latest results.

@guitargeek guitargeek force-pushed the string_view_backport branch from bb92818 to 5e864e5 Compare November 1, 2023 07:35
@guitargeek guitargeek force-pushed the string_view_backport branch 2 times, most recently from 35b6a40 to 671be60 Compare November 1, 2023 07:43
@guitargeek
Copy link
Contributor Author

Thanks @Axel-Naumann for the green light! FYI, I have added one more commit that replaces the usage of the RStringView header with <string_view>.

Also, can you please approve the sister PR in roottest to fix the CI failures? Thanks!
root-project/roottest#1031

@guitargeek
Copy link
Contributor Author

Oh, and the Windows 10 failures seem unrelated to this PR, right @bellenot? In any case, this PR should not be merged before we see any green Windows build

@bellenot
Copy link
Member

bellenot commented Nov 1, 2023

@guitargeek the only failure I see (on Jenkins) was due to Out of diskspace error. But it's running on another node now, so we'll see. (and I'm cleaning up the Windows nodes right now)

@phsft-bot
Copy link
Collaborator

Build failed on windows10/default.
Running on null:C:\build\workspace\root-pullrequests-build
See console output.

Errors:

  • [2023-11-01T08:24:00.367Z] C:\build\workspace\root-pullrequests-build\root\tree\tree\src\TChain.cxx(377,81): error C2440: '<function-style-cast>': cannot convert from 'TString' to 'std::string' [C:\build\workspace\root-pullrequests-build\build\tree\tree\Tree.vcxproj]

@root-project root-project deleted a comment from phsft-bot Nov 1, 2023
@root-project root-project deleted a comment from phsft-bot Nov 1, 2023
@root-project root-project deleted a comment from phsft-bot Nov 1, 2023
@root-project root-project deleted a comment from phsft-bot Nov 1, 2023
@root-project root-project deleted a comment from phsft-bot Nov 1, 2023
@root-project root-project deleted a comment from phsft-bot Nov 1, 2023
@root-project root-project deleted a comment from phsft-bot Nov 1, 2023
@root-project root-project deleted a comment from phsft-bot Nov 1, 2023
@root-project root-project deleted a comment from phsft-bot Nov 1, 2023
@guitargeek guitargeek force-pushed the string_view_backport branch from 671be60 to e74a3c2 Compare November 1, 2023 13:09
@phsft-bot
Copy link
Collaborator

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on windows10/default.
Running on null:C:\build\workspace\root-pullrequests-build
See console output.

Errors:

  • [2023-11-01T13:56:05.150Z] C:\build\workspace\root-pullrequests-build\root\core\meta\src\TClass.cxx(1400,51): error C2664: 'bool TClassEdit::IsStdPair(std::string_view)': cannot convert argument 1 from 'TString' to 'std::string_view' [C:\build\workspace\root-pullrequests-build\build\core\Core.vcxproj]
  • [2023-11-01T13:56:05.150Z] C:\build\workspace\root-pullrequests-build\root\core\meta\src\TClass.cxx(1400,15): error C2737: 'ispair': const object must be initialized [C:\build\workspace\root-pullrequests-build\build\core\Core.vcxproj]
  • [2023-11-01T13:56:05.150Z] C:\build\workspace\root-pullrequests-build\root\core\meta\src\TClass.cxx(1464,46): error C2665: 'TClassEdit::IsSTLCont': none of the 2 overloads could convert all the argument types [C:\build\workspace\root-pullrequests-build\build\core\Core.vcxproj]
  • [2023-11-01T13:56:05.150Z] C:\build\workspace\root-pullrequests-build\root\core\meta\src\TClass.cxx(1495,7): error C2664: 'bool TClassEdit::IsArtificial(std::string_view)': cannot convert argument 1 from 'TString' to 'std::string_view' [C:\build\workspace\root-pullrequests-build\build\core\Core.vcxproj]
  • [2023-11-01T13:56:05.150Z] C:\build\workspace\root-pullrequests-build\root\core\meta\src\TClass.cxx(1532,7): error C2664: 'bool TClassEdit::IsArtificial(std::string_view)': cannot convert argument 1 from 'TString' to 'std::string_view' [C:\build\workspace\root-pullrequests-build\build\core\Core.vcxproj]
  • [2023-11-01T13:56:05.150Z] C:\build\workspace\root-pullrequests-build\root\core\meta\src\TClass.cxx(4098,7): error C2664: 'bool TClassEdit::IsStdPair(std::string_view)': cannot convert argument 1 from 'TString' to 'std::string_view' [C:\build\workspace\root-pullrequests-build\build\core\Core.vcxproj]
  • [2023-11-01T13:56:05.150Z] C:\build\workspace\root-pullrequests-build\root\core\meta\src\TClass.cxx(6587,51): error C2665: 'TClassEdit::IsSTLCont': none of the 2 overloads could convert all the argument types [C:\build\workspace\root-pullrequests-build\build\core\Core.vcxproj]
  • [2023-11-01T13:56:30.080Z] C:\build\workspace\root-pullrequests-build\root\core\meta\src\TSchemaRule.cxx(459,59): error C2664: 'void TClassEdit::GetNormalizedName(std::string &,std::string_view)': cannot convert argument 2 from 'const TString' to 'std::string_view' [C:\build\workspace\root-pullrequests-build\build\core\Core.vcxproj]
  • [2023-11-01T13:56:30.080Z] C:\build\workspace\root-pullrequests-build\root\core\meta\src\TSchemaRule.cxx(477,59): error C2664: 'void TClassEdit::GetNormalizedName(std::string &,std::string_view)': cannot convert argument 2 from 'const TString' to 'std::string_view' [C:\build\workspace\root-pullrequests-build\build\core\Core.vcxproj]
  • [2023-11-01T13:56:30.665Z] C:\build\workspace\root-pullrequests-build\root\core\meta\src\TSchemaRuleSet.cxx(234,10): error C2664: 'bool TClassEdit::IsStdPair(std::string_view)': cannot convert argument 1 from 'const TString' to 'std::string_view' [C:\build\workspace\root-pullrequests-build\build\core\Core.vcxproj]

@guitargeek guitargeek force-pushed the string_view_backport branch from e74a3c2 to 280830a Compare November 1, 2023 14:04
@phsft-bot
Copy link
Collaborator

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default
How to customize builds

@phsft-bot
Copy link
Collaborator

Build failed on windows10/default.
Running on null:C:\build\workspace\root-pullrequests-build
See console output.

Errors:

  • [2023-11-01T14:16:19.373Z] LINK : fatal error LNK1104: cannot open file 'C:\build\workspace\root-pullrequests-build\build\bin\libCore.dll' [C:\build\workspace\root-pullrequests-build\build\core\Core.vcxproj]

Remove the `std::string_view` backport, because it's not necessary
anymore since the minimum C++ standard is now C++17.
Since C++17 is now the minimum standard, we can use `<string_view>`.
@guitargeek guitargeek force-pushed the string_view_backport branch from 280830a to 4f5cbf8 Compare November 1, 2023 14:56
@phsft-bot
Copy link
Collaborator

Starting build on ROOT-performance-centos8-multicore/soversion, ROOT-ubuntu2204/nortcxxmod, ROOT-ubuntu2004/python3, mac12arm/cxx20, windows10/default
How to customize builds

@guitargeek
Copy link
Contributor Author

Windows is green now

@guitargeek guitargeek merged commit bb33e9c into root-project:master Nov 1, 2023
12 of 14 checks passed
@guitargeek guitargeek deleted the string_view_backport branch November 1, 2023 16:30
guitargeek added a commit to root-project/roottest that referenced this pull request Nov 1, 2023
@phsft-bot
Copy link
Collaborator

Build failed on mac12arm/cxx20.
Running on macphsft26.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2023-11-01T16:57:18.225Z] CMake Error at /Users/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1126 (message):

@phsft-bot
Copy link
Collaborator

Build failed on ROOT-ubuntu2004/python3.
Running on root-ubuntu-2004-3.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Errors:

  • [2023-11-01T17:37:28.836Z] CMake Error at /home/sftnight/build/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1126 (message):

bachandi added a commit to bachandi/root that referenced this pull request Dec 18, 2023
As these operators are not needed anymore we can get rid of them.
Related to issue root-project#13993 and root-project#14244
guitargeek pushed a commit that referenced this pull request Dec 20, 2023
As these operators are not needed anymore we can get rid of them.
Related to issue #13993 and #14244
maksgraczyk pushed a commit to maksgraczyk/root that referenced this pull request Jan 12, 2024
As these operators are not needed anymore we can get rid of them.
Related to issue root-project#13993 and root-project#14244
vgvassilev pushed a commit to vgvassilev/root that referenced this pull request Feb 8, 2024
As these operators are not needed anymore we can get rid of them.
Related to issue root-project#13993 and root-project#14244
guitargeek pushed a commit to guitargeek/root that referenced this pull request Apr 8, 2024
As these operators are not needed anymore we can get rid of them.
Related to issue root-project#13993 and root-project#14244
guitargeek pushed a commit that referenced this pull request Apr 9, 2024
As these operators are not needed anymore we can get rid of them.
Related to issue #13993 and #14244
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.

7 participants