Skip to content

Multiple tests fail to build on Windows CI #17409

Closed

Description

@RenjieTang

This issue can be seen on #17222 CI run.
It seems that multiple existing tests are comparing uint64_t with optional<uint64_t> and Windows CI fails to build them.

Not sure why the Windows CI isn't broken in general. Maybe they only run tests that are affected by the PR?

Activity

  1. added
    triage
    on Jul 19, 2021
  2. RenjieTang commented on Jul 19, 2021

    @RenjieTang
    ContributorAuthor
  3. added and removed
    triage
    on Jul 20, 2021
  4. davinci26 commented on Jul 21, 2021

    @davinci26
    Member

    That's really weird because the same test passes on main branch. I verified this locally.

    Somehow this is caused by your changes but I am not sure how.

    If you want to get unblocked, I would add a call to .value() to explicitly get the value of the optional.

    If you don't want to add this then I can do it by eow.

    @wrowe knows way more than I do in terms of compilers and c++ standard so he might have an explanation.

  5. wrowe commented on Jul 21, 2021

    @wrowe
    Contributor

    I had trouble getting clarity on the offending lines of code, but my last encounter discovered comparisons to nullopt_t, while the method has_value seems more standard.

  6. wrowe commented on Jul 21, 2021

    @wrowe
    Contributor

    It seems some make very specific assumptions about the optional<> implementation that don't carry to the msvc cl compiler. It may go deeper than that, since I was able to reproduce under clang-cl compiler sharing the msvc stdc++ library. https://en.cppreference.com/w/cpp/utility/optional spells out portable usage of optional<>

  7. RenjieTang commented on Jul 21, 2021

    @RenjieTang
    ContributorAuthor

    I'd love to unblock myself and fix those issues by adding .value(). But unfortunately I don't have a Windows local environment to efficiently dig out all the problematic code. :(

  8. davinci26 commented on Jul 21, 2021

    @davinci26
    Member

    Let's be a bit optimistic and see if fixing config_impl_test.cc actually unblocks you.

    There are two cases there so maybe fixing this would unblock you.

    I am ooo till Friday, so this is the earlier I could push a pr.

  9. RenjieTang commented on Jul 22, 2021

    @RenjieTang
    ContributorAuthor

    I got lucky here and only needed to fix 2 test files to pass CI.
    I'm no longer blocked. Feel free to close this issue if you folks think no further action is needed.

  10. davinci26 commented on Jul 23, 2021

    @davinci26
    Member

    Closing since everything compiles on main. Although I suspect this will surface again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions