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

WIP: Bump fmt (to 10.2.1) and spdlog (to 1.13), remove patches #592

Closed
wants to merge 16 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ dependencies:
- zlib
- output_types: [conda]
packages:
- fmt==9.1.0
- fmt==10.2.1
py_version:
specific:
- output_types: conda
Expand Down
13 changes: 0 additions & 13 deletions rapids-cmake/cpm/patches/fmt/fix_10_1_1_version.diff

This file was deleted.

41 changes: 0 additions & 41 deletions rapids-cmake/cpm/patches/spdlog/nvcc_constexpr_fix.diff

This file was deleted.

26 changes: 6 additions & 20 deletions rapids-cmake/cpm/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,9 @@
"git_tag": "56c53beb6fb0cafd265b7fcc3df78ae487811b22"
},
"fmt": {
"version": "10.1.1",
"version": "10.2.1",
"git_url": "https://github.com/fmtlib/fmt.git",
"git_tag": "${version}",
"patches": [
{
"file": "fmt/fix_10_1_1_version.diff",
"issue": "fmt 10.1.1 produces a CMake package with version 10.1.0",
"fixed_in": "10.2.0"
}
]
"git_tag": "${version}"
},
"GTest": {
"version": "1.13.0",
Expand Down Expand Up @@ -99,20 +92,13 @@
},
"rmm": {
"version": "${rapids-cmake-version}",
"git_url": "https://github.com/rapidsai/rmm.git",
"git_tag": "branch-${version}"
"git_url": "https://github.com/jameslamb/rmm.git",
"git_tag": "update-fmt-and-spdlog"
},
"spdlog": {
"version": "1.12.0",
"version": "1.13.0",
"git_url": "https://github.com/gabime/spdlog.git",
"git_tag": "v${version}",
"patches": [
{
"file": "spdlog/nvcc_constexpr_fix.diff",
"issue": "Fix constexpr mismatch between spdlog and fmt [https://github.com/gabime/spdlog/issues/2856]",
"fixed_in": "1.13"
}
]
"git_tag": "v${version}"
},
"Thrust": {
"version": "1.17.2",
Expand Down
9 changes: 8 additions & 1 deletion testing/cpm/cpm_generate_pins-nested/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,15 @@ add_subdirectory(b)
include(${rapids-cmake-dir}/cpm/init.cmake)
rapids_cpm_init(GENERATE_PINNED_VERSIONS)

# only check projects that were downloaded by CPM (ignore those already in the build environment)
#
# don't check cuco here as it uses hashes and that breaks our verify script
set(projects-to-verify rmm fmt spdlog CCCL)
foreach(proj IN ITEMS rmm fmt spdlog CCCL)
if(${proj}_SOURCE_DIR)
list(APPEND projects-to-verify ${proj})
endif()
endforeach()
Copy link
Member Author

Choose a reason for hiding this comment

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

I chose not to add validation here that projects-to-verify is non-empty. That already happens in the verify/ scripts.

e.g.

string(REPLACE " " ";" projects-to-verify "${projects-to-verify}")
if(NOT projects-to-verify)
message(FATAL_ERROR "Failed to pass anything in projects-to-verify")
endif()


add_custom_target(verify_generated_pins ALL
COMMAND ${CMAKE_COMMAND} -S="${CMAKE_SOURCE_DIR}/verify/" -B"${CMAKE_BINARY_DIR}/verify_build"
-D"rapids-cmake-dir=${rapids-cmake-dir}"
Expand Down
17 changes: 12 additions & 5 deletions testing/cpm/cpm_generate_pins-nested/verify/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,29 @@ foreach(proj IN LISTS projects-to-verify)
rapids_cpm_package_details(${proj} ${proj}_version ${proj}_repository ${proj}_tag ${proj}_shallow ${proj}_exclude)
endforeach()


file(READ "${CMAKE_CURRENT_BINARY_DIR}/../rapids-cmake/pinned_versions.json" json_data)

# Verify that the pinned_versions is valid json by using it
rapids_cpm_package_override("${CMAKE_CURRENT_BINARY_DIR}/../rapids-cmake/pinned_versions.json")

# helper macro for gathering versions.json and pinned_versions.json content to be printed in error messages
macro(_get_json_data)
include("${rapids-cmake-dir}/cpm/detail/get_default_json.cmake")
include("${rapids-cmake-dir}/cpm/detail/get_override_json.cmake")
get_default_json(${proj} default_versions)
get_override_json(${proj} pinned_versions)
endmacro()

foreach(proj IN LISTS projects-to-verify)
# Verify that each git_tag is now different.
rapids_cpm_package_details(${proj} ${proj}_version ${proj}_repository pin_${proj}_tag pin_${proj}_shallow ${proj}_exclude)
if(pin_${proj}_tag STREQUAL ${proj}_tag)
message(FATAL_ERROR "pinned ${proj} tag (${pin_${proj}_tag}) should differ compared to baseline ${${proj}_tag}")
_get_json_data()
message(FATAL_ERROR "pinned ${proj} tag (${pin_${proj}_tag}) should differ compared to baseline ${${proj}_tag}\npinned_versions.json:\n${pinned_versions}\nversions.json:\n${default_versions}")
endif()

# Everything should have shallow marked as false
# so that clones by SHA1 work
if(pin_${proj}_shallow)
message(FATAL_ERROR "pin_${proj}_shallow is expected to be false, but got ${pin_${proj}_shallow}")
_get_json_data()
message(FATAL_ERROR "pin_${proj}_shallow is expected to be false, but got ${pin_${proj}_shallow}\npinned_versions.json:\n${pinned_versions}\nversions.json:\n${default_versions}")
endif()
endforeach()
9 changes: 8 additions & 1 deletion testing/cpm/cpm_generate_pins-simple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ include(${rapids-cmake-dir}/cpm/rmm.cmake)

rapids_cpm_init(GENERATE_PINNED_VERSIONS)
rapids_cpm_rmm()
set(projects-to-verify rmm fmt spdlog CCCL)

# only check projects that were downloaded by CPM (ignore those already in the build environment)
foreach(proj IN ITEMS rmm fmt spdlog CCCL)
if(${proj}_SOURCE_DIR)
list(APPEND projects-to-verify ${proj})
endif()
endforeach()

add_custom_target(verify_generated_pins ALL
COMMAND ${CMAKE_COMMAND} -S="${CMAKE_SOURCE_DIR}/verify/" -B"${CMAKE_BINARY_DIR}/verify_build"
-D"rapids-cmake-dir=${rapids-cmake-dir}"
Expand Down
14 changes: 12 additions & 2 deletions testing/cpm/cpm_generate_pins-simple/verify/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,26 @@ endforeach()
# Verify that the pinned_versions is valid json by using it
rapids_cpm_package_override("${CMAKE_CURRENT_BINARY_DIR}/../rapids-cmake/pinned_versions.json")

# helper macro for gathering versions.json and pinned_versions.json content to be printed in error messages
macro(_get_json_data)
include("${rapids-cmake-dir}/cpm/detail/get_default_json.cmake")
include("${rapids-cmake-dir}/cpm/detail/get_override_json.cmake")
get_default_json(${proj} default_versions)
get_override_json(${proj} pinned_versions)
endmacro()

foreach(proj IN LISTS projects-to-verify)
# Verify that each git_tag is now different.
rapids_cpm_package_details(${proj} ${proj}_version ${proj}_repository pin_${proj}_tag pin_${proj}_shallow ${proj}_exclude)
if(pin_${proj}_tag STREQUAL ${proj}_tag)
message(FATAL_ERROR "pinned ${proj} tag (${pin_${proj}_tag}) should differ compared to baseline ${${proj}_tag}")
_get_json_data()
message(FATAL_ERROR "pinned ${proj} tag (${pin_${proj}_tag}) should differ compared to baseline ${${proj}_tag}\npinned_versions.json:\n${pinned_versions}\nversions.json:\n${default_versions}")
endif()

# Everything should have shallow marked as false
# so that clones by SHA1 work
if(pin_${proj}_shallow)
message(FATAL_ERROR "pin_${proj}_shallow is expected to be false, but got ${pin_${proj}_shallow}")
_get_json_data()
message(FATAL_ERROR "pin_${proj}_shallow is expected to be false, but got ${pin_${proj}_shallow}\npinned_versions.json:\n${pinned_versions}\nversions.json:\n${default_versions}")
endif()
endforeach()