chromium / subspace

A concept-centered standard library for C++20, enabling safer and more reliable products and a more modern feel for C++ code.; Also home of Subdoc the code-documentation generator.
https://suslib.cc
Apache License 2.0
88 stars 14 forks source link

MSVC Trybots and CI are disabled #267

Open danakj opened 1 year ago

danakj commented 1 year ago

Currently MSVC can not build subspace. 17.4.2 works ✅ 17.6.3 does not 🚫

Github windows-latest has upgraded to 17.6.3 so we can't run MSVC bots. Github windows-2019 has MSVC 16 which was also not capable of building all the C++20 stuff in Subspace.

Upstream bug with MSVC: https://developercommunity.visualstudio.com/t/Update-to-1763-now-rejects-valid-C-i/10394500

Disabled here: https://github.com/chromium/subspace/commit/091aee45995274cd8cc7d2ffa0016b570d356e17

danakj commented 11 months ago

CL 19.38.33130 is working, which comes with MSVC 17.8.1

I probably have these names wrong. I think it's MSVS 17.8.1.

danakj commented 11 months ago

2022 17.8.1 is build 17.8.34316.72

Github is currently on build 17.8.34309.116 which is 17.8.0 from a week ago.

17.8.0 is not building subspace it seems, so we shall try again when github bumps.

danakj commented 11 months ago

Hm, I am using MSVC 2022 17.8.1 locally and it is working. But on github it is failing.

https://github.com/chromium/subspace/actions/runs/7078666426/job/19264399269?pr=415

D:\a\subspace\subspace\sus\choice\choice_unittest.cc(85): error C2672: 'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u64>,sus::tuple_type::Tuple<sus::num::u32>>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with': no matching overloaded function found
D:\a\subspace\subspace\sus/choice/choice.h(320): note: could be 'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u64>,sus::tuple_type::Tuple<sus::num::u32>>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u64>,sus::tuple_type::Tuple<sus::num::u32>>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(Us &&...) noexcept'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(85): note: the associated constraints are not satisfied
D:\a\subspace\subspace\sus/choice/choice.h(314): note: the constraint was not satisfied
D:\a\subspace\subspace\sus/choice/choice.h(295): note: or       'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u64>,sus::tuple_type::Tuple<sus::num::u32>>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u64>,sus::tuple_type::Tuple<sus::num::u32>>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(U &&) noexcept'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(85): note: Failed to specialize function template 'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u64>,sus::tuple_type::Tuple<sus::num::u32>>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u64>,sus::tuple_type::Tuple<sus::num::u32>>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(U &&) noexcept'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(85): note: With the following template arguments:
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(85): note: 'V=`anonymous-namespace'::Order::First'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(85): note: 'U=unsigned int'
D:\a\subspace\subspace\sus/choice/choice.h(287): note: or       'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u64>,sus::tuple_type::Tuple<sus::num::u32>>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u64>,sus::tuple_type::Tuple<sus::num::u32>>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(void) noexcept'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(85): note: 'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u64>,sus::tuple_type::Tuple<sus::num::u32>>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u64>,sus::tuple_type::Tuple<sus::num::u32>>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(void) noexcept': expects 0 arguments - 1 provided
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(107): error C2672: 'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with': no matching overloaded function found
D:\a\subspace\subspace\sus/choice/choice.h(320): note: could be 'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(Us &&...) noexcept'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(107): note: the associated constraints are not satisfied
D:\a\subspace\subspace\sus/choice/choice.h(314): note: the constraint was not satisfied
D:\a\subspace\subspace\sus/choice/choice.h(295): note: or       'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(U &&) noexcept'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(107): note: 'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(U &&) noexcept': expects 1 arguments - 0 provided
D:\a\subspace\subspace\sus/choice/choice.h(287): note: or       'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(void) noexcept'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(107): note: Failed to specialize function template 'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(void) noexcept'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(107): note: With the following template arguments:
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(107): note: 'V=`anonymous-namespace'::Order::Second'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(108): error C3536: 'u': cannot be used before it is initialized
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(108): error C2660: 'testing::internal::EqHelper::Compare': function does not take 3 arguments
D:\a\subspace\subspace\third_party\googletest\googletest/include/gtest/gtest.h(1402): note: see declaration of 'testing::internal::EqHelper::Compare'
D:\a\subspace\subspace\third_party\googletest\googletest/include/gtest/gtest.h(1409): note: could be 'testing::AssertionResult testing::internal::EqHelper::Compare(const char *,const char *,std::nullptr_t,T *)'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(108): note: 'testing::AssertionResult testing::internal::EqHelper::Compare(const char *,const char *,std::nullptr_t,T *)': expects 4 arguments - 3 provided
D:\a\subspace\subspace\third_party\googletest\googletest/include/gtest/gtest.h(1390): note: or       'testing::AssertionResult testing::internal::EqHelper::Compare(const char *,const char *,const T1 &,const T2 &)'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(108): note: 'testing::AssertionResult testing::internal::EqHelper::Compare(const char *,const char *,const T1 &,const T2 &)': expects 4 arguments - 3 provided
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(108): note: while trying to match the argument list '(const char [10], const char [14], `anonymous-namespace'::Order)'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(117): error C2672: 'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with': no matching overloaded function found
D:\a\subspace\subspace\sus/choice/choice.h(320): note: could be 'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(Us &&...) noexcept'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(117): note: the associated constraints are not satisfied
D:\a\subspace\subspace\sus/choice/choice.h(314): note: the constraint was not satisfied
D:\a\subspace\subspace\sus/choice/choice.h(295): note: or       'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(U &&) noexcept'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(117): note: Failed to specialize function template 'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(U &&) noexcept'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(117): note: With the following template arguments:
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(117): note: 'V=`anonymous-namespace'::Order::First'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(117): note: 'U=sus::num::u32'
D:\a\subspace\subspace\sus/choice/choice.h(287): note: or       'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(void) noexcept'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(117): note: 'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u32>,sus::choice_type::__private::MakeStorageType<void>::type>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(void) noexcept': expects 0 arguments - 1 provided
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(118): error C3536: 'u': cannot be used before it is initialized
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(118): error C2059: syntax error: ')'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(118): error C2181: illegal else without matching if
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(118): error C2065: 'gtest_ar': undeclared identifier
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(118): error C2440: '<function-style-cast>': cannot convert from 'initializer list' to 'testing::internal::AssertHelper'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(118): note: 'testing::internal::AssertHelper::AssertHelper': function does not take 3 arguments
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(118): note: while trying to match the argument list '(testing::TestPartResult::Type, const char [53], int)'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(122): warning C4456: declaration of 'u' hides previous local declaration
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(117): note: see declaration of 'u'
danakj commented 11 months ago

The relevant error part is this:

D:\a\subspace\subspace\sus\choice\choice_unittest.cc(85): note: Failed to specialize function template 'sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u64>,sus::tuple_type::Tuple<sus::num::u32>>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second> sus::choice_type::Choice<sus::choice_type::__private::TypeList<sus::tuple_type::Tuple<sus::num::u64>,sus::tuple_type::Tuple<sus::num::u32>>,`anonymous-namespace'::Order::First,`anonymous-namespace'::Order::Second>::with(U &&) noexcept'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(85): note: With the following template arguments:
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(85): note: 'V=`anonymous-namespace'::Order::First'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(85): note: 'U=unsigned int'

Which comes from this call:

  enum class Order {
    First,
    Second,
    Third,
  };
  using One =
      Choice<sus_choice_types((Order::First, u64), (Order::Second, u32))>;
  auto u = One::with<One::Tag::First>(1u);
danakj commented 11 months ago

The same happens for the 0-arg with() overload for void Choice values:

D:\a\subspace\subspace\sus\choice\choice_unittest.cc(107): note: Failed to specialize function template
 'sus::choice_type::Choice<
   sus::choice_type::__private::TypeList<
    sus::tuple_type::Tuple<sus::num::u32>,
    sus::choice_type::__private::MakeStorageType<void>::type>,
    `anonymous-namespace'::Order::First,
    `anonymous-namespace'::Order::Second>
sus::choice_type::Choice<
  sus::choice_type::__private::TypeList<
    sus::tuple_type::Tuple<sus::num::u32>,
    sus::choice_type::__private::MakeStorageType<void>::type>,
    `anonymous-namespace'::Order::First,
    `anonymous-namespace'::Order::Second>
  ::with(void) noexcept'
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(107): note: With the following template arguments:
D:\a\subspace\subspace\sus\choice\choice_unittest.cc(107): note: 'V=`anonymous-namespace'::Order::Second'
danakj commented 11 months ago

https://github.com/chromium/subspace/pull/415 is the PR but can't land while it's broken on CI. I don't know why CI behaves differently than my machine does with the same MSVC.

danakj commented 11 months ago

Oh, hm. On my machine, configure says:

[cmake] -- The C compiler identification is MSVC 19.38.33130.0
[cmake] -- The CXX compiler identification is MSVC 19.38.33130.0
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - done
[cmake] -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx86/x64/cl.exe - skipped

On Github, configure says:

-- The C compiler identification is MSVC 19.37.32826.1
-- The CXX compiler identification is MSVC 19.37.32826.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Tools/MSVC/14.37.32822/bin/HostX64/x64/cl.exe - skipped

So the version is still old, even though https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md#visual-studio-enterprise-2022 says it should be at build 17.8.34316.72 which is what I have installed.

danakj commented 11 months ago

Is it possible VS Enterprise (github) has different MSVC versions than VS Community (me)...?

danakj commented 11 months ago

Reported the bug here, as it seems the version is just older than it's supposed to be: https://github.com/orgs/community/discussions/77793