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

Implement the ABI plan from GH-1814 #1929

Merged
merged 3 commits into from
May 27, 2021
Merged

Conversation

CaseyCarter
Copy link
Member

@CaseyCarter CaseyCarter commented May 24, 2021

  • Condition <format> and "<chronat>" on __cpp_lib_format instead of __cpp_lib_concepts.
  • Condition the view concept - and everything that relies on it, including all of <ranges> - on __cpp_lib_ranges in addition to __cpp_lib_concepts.
  • Add C++23 STL and testing infrastructure:
    • Define _HAS_CXX23 in <yvals_core.h>. We'll eventually want this to move into <vcruntime.h> so all _HAS_CXXMEOW definitions are nicely localized.
    • _HAS_CXX23 is defined to 1 iff _HAS_CXX20 != 0 and _MSVC_LANG (if defined) or __cplusplus (otherwise) is greater than C++20's value of 202002L. For Clang coverage, we'll have to manually define _HAS_CXX23 to 1 until Clang updates their __cplusplus value for /std:c++latest.
    • Rename meow_concepts_woof.lst to meow_concepts_latest_woof.lst.
    • Update test matrices: Copy all meow_latest_woof.lst matrices to meow_20_woof.lst. Add /std:c++20 coverage to the latter (still spelled /std:c++latest for Clang which doesn't grok /std:c++20) by duplicating the C++17 configs. /std:c++latest becomes C++23 mode (with additions of /D_HAS_CXX23 for Clang).
    • Replace uses of meow_latest_woof.lst with meow_20_woof.lst, except for a few tests that are only intended to have latest coverage, notably include_each_header_alone and all of libcxx.
  • Only define __cpp_lib_format and __cpp_lib_ranges in C++23 mode. Update the feature-test macro test accordingly.

Note: I didn't a ton of new C++20 configurations, only as many as we had C++17 configurations. This increased the CI runtime from 22:05 to 23:40 while covering 114k vs. 108k test cases. If we are concerned about this increase, we can probably steal a C++14 configuration from each matrix instead and promote it to C++20. This would keep the CI impact the same by sacrificing some C++14 coverage for C++20 coverage. Given that the impact is <10% and this change is high priority, I'd prefer to apply this as-is and followup later with any such tweaking if we feel it's necessary.

* Condition `<format>` and "`<chronat>`" on `__cpp_lib_format` instead of `__cpp_lib_concepts`.
* Condition the `view` concept - and everything that relies on it, including all of `<ranges>` - on `__cpp_lib_ranges` in addition to `__cpp_lib_concepts`.
* Add C++23 STL and testing infrastructure:
  * Define `_HAS_CXX23` in `<yvals_core.h>`. We'll eventually want this to move into `<vcruntime.h>` so all `_HAS_CXXMEOW` definitions are nicely localized.
  * `_HAS_CXX23` is defined to `1` iff `_HAS_CXX20 != 0` and `_MSVC_LANG` (if defined) or `__cplusplus` (otherwise) is greater than C++20's value of `202002L`. For Clang coverage, we'll have to manually define `_HAS_CXX23` to `1` until Clang updates their `__cplusplus` value for `/std:c++latest`.
  * Rename `meow_concepts_woof.lst` to `meow_concepts_latest_woof.lst`.
  * Update test matrices: Copy all `meow_latest_woof.lst` matrices to `meow_20_woof.lst`. Add `/std:c++20` coverage to the latter (still spelled `/std:c++latest` for Clang which doesn't grok `/std:c++20`) by duplicating the C++17 configs. `/std:c++latest` becomes C++23 mode (with additions of `/D_HAS_CXX23` for Clang).
  * Replace uses of `meow_latest_woof.lst` with `meow_20_woof.lst`, except for a few tests that are only intended to have `latest` coverage, notably `include_each_header_alone` and all of `libcxx`.
* Only define `__cpp_lib_format` and `__cpp_lib_ranges` in C++23 mode. Update the feature-test macro test accordingly.
@CaseyCarter CaseyCarter added bug Something isn't working cxx20 C++20 feature high priority Important! test Related to test code ranges C++20/23 ranges format C++20/23 format labels May 24, 2021
@CaseyCarter CaseyCarter requested a review from a team as a code owner May 24, 2021 18:10
Copy link
Contributor

@miscco miscco left a comment

Choose a reason for hiding this comment

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

I took the liberty to not check every file

stl/inc/format Outdated Show resolved Hide resolved
stl/inc/ranges Outdated Show resolved Hide resolved
stl/inc/chrono Outdated Show resolved Hide resolved
stl/inc/yvals_core.h Outdated Show resolved Hide resolved
tests/std/tests/strict_concepts_20_matrix.lst Show resolved Hide resolved
tests/libcxx/usual_matrix.lst Show resolved Hide resolved
tests/std/tests/usual_matrix.lst Outdated Show resolved Hide resolved
tests/std/tests/impure_matrix.lst Show resolved Hide resolved
tests/std/tests/impure_matrix.lst Outdated Show resolved Hide resolved
tests/std/tests/locale0_implib_cpp_matrix.lst Outdated Show resolved Hide resolved
tests/std/tests/VSO_0157762_feature_test_macros/env.lst Outdated Show resolved Hide resolved
stl/inc/format Show resolved Hide resolved
stl/inc/format Show resolved Hide resolved
stl/inc/ranges Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cxx20 C++20 feature format C++20/23 format high priority Important! ranges C++20/23 ranges test Related to test code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants