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

Bump timsort to 3.0.0 #22516

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Bump timsort to 3.0.0 #22516

wants to merge 5 commits into from

Conversation

Morwenn
Copy link
Contributor

@Morwenn Morwenn commented Jan 23, 2024

Specify library name and version: timsort/3.0.0

Version 3.0.0 requires C++20, so the automatic update was not enough to automatically bump the library version.


@CLAassistant
Copy link

CLAassistant commented Jan 23, 2024

CLA assistant check
All committers have signed the CLA.

@conan-center-bot

This comment has been minimized.

@toge
Copy link
Contributor

toge commented Jan 24, 2024

@Morwenn
To solve CI errors, this changes can help.
https://github.com/conan-io/conan-center-index/pull/22517/files

these changes might help to solve CI errors.

  • validate compiler version
  • specify c++ version on CMakeLists.txt of test_package

@Morwenn
Copy link
Contributor Author

Morwenn commented Jan 24, 2024

Thanks, I'm going to try those later tonight.

@conan-center-bot

This comment has been minimized.

@Morwenn
Copy link
Contributor Author

Morwenn commented Jan 25, 2024

I think it doesn't work because <ranges> is only truly available in libc++ 15, it's experimental before - so it could work with Clang < 15 but only if it uses libstdc++. I supposed that it failed there because AppleClang defaults to libc++. Is there anyway I can detect that to fix the recipe?

@toge
Copy link
Contributor

toge commented Jan 26, 2024

@Morwenn
How about incrementing apple-clang version:

                "apple-clang": "14",

In cpp reference, apple-clang seems to support ranges since 14.

I confirmed timsort/3.0.0 works well on apple-clang 15.

@Morwenn
Copy link
Contributor Author

Morwenn commented Jan 27, 2024

Hum, I forgot that libstdc++ was considered deprecated with AppleClang, so you're right, there's probably no need to try to be smart about it.

@conan-center-bot

This comment has been minimized.

elseif(gfx-timsort_VERSION VERSION_LESS "3.0.0")
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
else()
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)
Copy link
Contributor

Choose a reason for hiding this comment

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

Since cxx_std_20 requires 3.12, would you update cmake_minimum_required?

https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thinking about it again maybe these lines aren't be useful: shouldn't the conan-generated targets assign the correct compile features for the standard version?

I introduced them on your suggestion to fix the previous problem, but maybe constraining the compiler versions was enough.

Copy link
Member

Choose a reason for hiding this comment

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

For Conan 2.x is all solved, the CMakeDeps, etc. will require 3.15. Plus, cppstd is defined by default there, so passing target_compile_features should no longer needed. I guess it's okay keeping the current, otherwise it would fail to build with Conan 2.x in case running an older version of cmake

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By "the current", do you mean as it was before this MR, or the target_compile_features currently in the MR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I get errors when removing target_compile_features apparently, guess I incorrectly interpreted your message.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ❌

Failure in build 5 (023332db9163dbb12ced8a69cf0288a1ff81847a):

  • timsort/3.0.0:
    Didn't run or was cancelled before finishing

  • timsort/2.1.0:
    CI failed to create some packages (All logs)

    Logs for packageID 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9:
    [settings]
    arch=x86_64
    build_type=Release
    compiler=gcc
    compiler.libcxx=libstdc++11
    compiler.version=5
    os=Linux
    
    [...]
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:757:59:   required from ‘void gfx::timsort(RandomAccessIterator, RandomAccessIterator, Compare, Projection) [with RandomAccessIterator = int*; Compare = std::less<int>; Projection = gfx::detail::identity]’
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:775:17:   required from ‘void gfx::timsort(RandomAccessIterator, RandomAccessIterator) [with RandomAccessIterator = int*]’
    /home/conan/w/prod-v1/bsr/cci-913556e6/recipes/timsort/all/test_package/test_package.cpp:16:33:   required from here
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:432:28: error: no match for call to ‘(gfx::detail::projection_compare<std::less<int>, gfx::detail::identity>) (int&, int&)’
                     if (compare(*cursor2, *cursor1)) {
                                ^
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:96:10: note: candidate: template<class T, class U> bool gfx::detail::projection_compare<Compare, Projection>::operator()(T) [with T = T; U = U; Compare = std::less<int>; Projection = gfx::detail::identity]
         bool operator()(T &&lhs, U &&rhs) {
              ^
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:96:10: note:   template argument deduction/substitution failed:
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:432:28: note:   candidate expects 1 argument, 2 provided
                     if (compare(*cursor2, *cursor1)) {
                                ^
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp: In instantiation of ‘void gfx::detail::TimSort<RandomAccessIterator, Compare>::mergeHi(gfx::detail::TimSort<RandomAccessIterator, Compare>::iter_t, gfx::detail::TimSort<RandomAccessIterator, Compare>::diff_t, gfx::detail::TimSort<RandomAccessIterator, Compare>::iter_t, gfx::detail::TimSort<RandomAccessIterator, Compare>::diff_t, Compare) [with RandomAccessIterator = int*; Compare = gfx::detail::projection_compare<std::less<int>, gfx::detail::identity>; gfx::detail::TimSort<RandomAccessIterator, Compare>::iter_t = int*; gfx::detail::TimSort<RandomAccessIterator, Compare>::diff_t = long int]’:
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:276:20:   required from ‘void gfx::detail::TimSort<RandomAccessIterator, Compare>::mergeConsecutiveRuns(gfx::detail::TimSort<RandomAccessIterator, Compare>::iter_t, gfx::detail::TimSort<RandomAccessIterator, Compare>::diff_t, gfx::detail::TimSort<RandomAccessIterator, Compare>::iter_t, gfx::detail::TimSort<RandomAccessIterator, Compare>::diff_t, Compare) [with RandomAccessIterator = int*; Compare = gfx::detail::projection_compare<std::less<int>, gfx::detail::identity>; gfx::detail::TimSort<RandomAccessIterator, Compare>::iter_t = int*; gfx::detail::TimSort<RandomAccessIterator, Compare>::diff_t = long int]’
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:249:29:   required from ‘void gfx::detail::TimSort<RandomAccessIterator, Compare>::mergeAt(gfx::detail::TimSort<RandomAccessIterator, Compare>::diff_t, Compare) [with RandomAccessIterator = int*; Compare = gfx::detail::projection_compare<std::less<int>, gfx::detail::identity>; gfx::detail::TimSort<RandomAccessIterator, Compare>::diff_t = long int]’
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:210:24:   required from ‘void gfx::detail::TimSort<RandomAccessIterator, Compare>::mergeCollapse(Compare) [with RandomAccessIterator = int*; Compare = gfx::detail::projection_compare<std::less<int>, gfx::detail::identity>]’
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:693:13:   required from ‘static void gfx::detail::TimSort<RandomAccessIterator, Compare>::sort(gfx::detail::TimSort<RandomAccessIterator, Compare>::iter_t, gfx::detail::TimSort<RandomAccessIterator, Compare>::iter_t, Compare) [with RandomAccessIterator = int*; Compare = gfx::detail::projection_compare<std::less<int>, gfx::detail::identity>; gfx::detail::TimSort<RandomAccessIterator, Compare>::iter_t = int*]’
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:757:59:   required from ‘void gfx::timsort(RandomAccessIterator, RandomAccessIterator, Compare, Projection) [with RandomAccessIterator = int*; Compare = std::less<int>; Projection = gfx::detail::identity]’
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:775:17:   required from ‘void gfx::timsort(RandomAccessIterator, RandomAccessIterator) [with RandomAccessIterator = int*]’
    /home/conan/w/prod-v1/bsr/cci-913556e6/recipes/timsort/all/test_package/test_package.cpp:16:33:   required from here
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:556:28: error: no match for call to ‘(gfx::detail::projection_compare<std::less<int>, gfx::detail::identity>) (int&, int&)’
                     if (compare(*cursor2, *cursor1)) {
                                ^
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:96:10: note: candidate: template<class T, class U> bool gfx::detail::projection_compare<Compare, Projection>::operator()(T) [with T = T; U = U; Compare = std::less<int>; Projection = gfx::detail::identity]
         bool operator()(T &&lhs, U &&rhs) {
              ^
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:96:10: note:   template argument deduction/substitution failed:
    /home/conan/w/prod-v1/bsr/101831/ffffd/.conan/data/timsort/2.1.0/_/_/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include/gfx/timsort.hpp:556:28: note:   candidate expects 1 argument, 2 provided
                     if (compare(*cursor2, *cursor1)) {
                                ^
    make[2]: *** [test_package/CMakeFiles/test_package.dir/test_package.cpp.o] Error 1
    make[1]: *** [test_package/CMakeFiles/test_package.dir/all] Error 2
    make: *** [all] Error 2
    timsort/2.1.0 (test package): WARN: 
         ************************************************
         The 'cmake_find_package_multi' generator is deprecated.
         Please update your code and remove it.
         *************************************************
    
    timsort/2.1.0 (test package): WARN: 
         ************************************************
         The 'cmake' generator is deprecated.
         Please update your code and remove it.
         *************************************************
    
    timsort/2.1.0 (test package): WARN: **** The 'from conans import CMake' helper is deprecated. Please update your code and remove it. ****
    ERROR: timsort/2.1.0 (test package): Error in build() method, line 12
    	cmake.build()
    	ConanException: Error 2 while executing cmake --build '/home/conan/w/prod-v1/bsr/cci-913556e6/recipes/timsort/all/test_v1_package/build/aa812f66cc25d52e62cde1f093beffcc1fbfe3f8' '--' '-j3'
    
  • timsort/1.2.0:
    Didn't run or was cancelled before finishing

  • timsort/2.0.2:
    Didn't run or was cancelled before finishing

  • timsort/1.2.2:
    Didn't run or was cancelled before finishing

  • timsort/2.0.0:
    Didn't run or was cancelled before finishing

  • timsort/2.0.1:
    Didn't run or was cancelled before finishing

  • timsort/1.2.1:
    Didn't run or was cancelled before finishing

  • timsort/1.3.0:
    Didn't run or was cancelled before finishing


Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants