Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rapidcsv for openSUSE:Factory checked in at 2026-03-02 17:39:47 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rapidcsv (Old) and /work/SRC/openSUSE:Factory/.rapidcsv.new.29461 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rapidcsv" Mon Mar 2 17:39:47 2026 rev:9 rq:1335708 version:8.92 Changes: -------- --- /work/SRC/openSUSE:Factory/rapidcsv/rapidcsv.changes 2025-09-22 16:41:57.299147156 +0200 +++ /work/SRC/openSUSE:Factory/.rapidcsv.new.29461/rapidcsv.changes 2026-03-02 17:39:55.350343581 +0100 @@ -1,0 +2,7 @@ +Sat Feb 21 09:58:54 UTC 2026 - Matwey Kornilov <[email protected]> + +- Update to version 8.92: + * add support for more integer types + * add cmake find_package support + +------------------------------------------------------------------- Old: ---- rapidcsv-8.89.tar.gz New: ---- rapidcsv-8.92.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rapidcsv.spec ++++++ --- /var/tmp/diff_new_pack.nXZWmK/_old 2026-03-02 17:39:56.054372966 +0100 +++ /var/tmp/diff_new_pack.nXZWmK/_new 2026-03-02 17:39:56.058373133 +0100 @@ -1,6 +1,7 @@ # # spec file for package rapidcsv # +# Copyright (c) 2026 SUSE LLC # Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties @@ -17,7 +18,7 @@ Name: rapidcsv -Version: 8.89 +Version: 8.92 Release: 0 Summary: C++ header-only library for CSV parsing License: BSD-3-Clause @@ -57,6 +58,9 @@ mkdir -p %{buildroot}/%{_docdir}/%{name}-devel cp -rp examples %{buildroot}/%{_docdir}/%{name}-devel/examples +mkdir -p %{buildroot}/%{_datadir}/cmake/rapidcsv +mv %{buildroot}/%{_prefix}/cmake/*.cmake %{buildroot}/%{_datadir}/cmake/rapidcsv + %fdupes %{buildroot}/%{_prefix} %check @@ -67,4 +71,7 @@ %doc README.md doc %{_includedir}/rapidcsv.h %{_docdir}/%{name}-devel/examples +%dir %{_datadir}/cmake/rapidcsv +%{_datadir}/cmake/rapidcsv/rapidcsvConfig.cmake +%{_datadir}/cmake/rapidcsv/rapidcsvTargets.cmake ++++++ rapidcsv-8.89.tar.gz -> rapidcsv-8.92.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rapidcsv-8.89/CMakeLists.txt new/rapidcsv-8.92/CMakeLists.txt --- old/rapidcsv-8.89/CMakeLists.txt 2025-08-16 14:35:16.000000000 +0200 +++ new/rapidcsv-8.92/CMakeLists.txt 2026-01-18 07:13:16.000000000 +0100 @@ -1,6 +1,7 @@ # Project cmake_minimum_required(VERSION 3.14...3.22 FATAL_ERROR) project(rapidcsv VERSION 1.0 LANGUAGES CXX) +include(CMakePackageConfigHelpers) set (CMAKE_CXX_STANDARD 11) if(MSVC) if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") @@ -30,7 +31,10 @@ # Library add_library(rapidcsv INTERFACE) -target_include_directories(rapidcsv INTERFACE src) +target_include_directories(rapidcsv INTERFACE + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src> + $<INSTALL_INTERFACE:include> +) # Tests option(RAPIDCSV_BUILD_TESTS "Build tests" OFF) @@ -187,6 +191,8 @@ if(HAS_CODECVT) add_unit_test(test101) endif() + add_unit_test(test102) + add_unit_test(test103) # perf tests add_perf_test(ptest001) @@ -217,12 +223,29 @@ if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) message(STATUS "Install/uninstall targets enabled.") - # Install + # Install header install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/rapidcsv.h DESTINATION include) + # Export targets + install(TARGETS rapidcsv EXPORT rapidcsvTargets) + install(EXPORT rapidcsvTargets + NAMESPACE rapidcsv:: + DESTINATION cmake) + + # Generate and install config files + configure_package_config_file( + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/rapidcsvConfig.cmake.in + ${CMAKE_CURRENT_BINARY_DIR}/rapidcsvConfig.cmake + INSTALL_DESTINATION cmake + ) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rapidcsvConfig.cmake DESTINATION cmake) + # Uninstall - add_custom_target(uninstall COMMAND "${CMAKE_COMMAND}" -E remove "${CMAKE_INSTALL_PREFIX}/include/rapidcsv.h" -) + add_custom_target(uninstall + COMMAND "${CMAKE_COMMAND}" -E remove "${CMAKE_INSTALL_PREFIX}/include/rapidcsv.h" + COMMAND "${CMAKE_COMMAND}" -E remove "${CMAKE_INSTALL_PREFIX}/cmake/rapidcsvConfig.cmake" + COMMAND "${CMAKE_COMMAND}" -E remove "${CMAKE_INSTALL_PREFIX}/cmake/rapidcsvTargets.cmake" + ) else() message(STATUS "Install/uninstall targets disabled.") endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rapidcsv-8.89/README.md new/rapidcsv-8.92/README.md --- old/rapidcsv-8.89/README.md 2025-08-16 14:35:16.000000000 +0200 +++ new/rapidcsv-8.92/README.md 2026-01-18 07:13:16.000000000 +0100 @@ -429,11 +429,16 @@ for reference. When enabled, the UTF-16 encoding of any loaded file is automatically detected. -CMake FetchContent ------------------- -Rapidcsv may be included in a CMake project using FetchContent. Refer to the -[CMake FetchContent Example Project](examples/cmake-fetchcontent) and in -particular its [CMakeLists.txt](examples/cmake-fetchcontent/CMakeLists.txt). +CMake +----- +Rapidcsv may be included in a CMake project using various methods: + +- Add Subdirectory: [Example Project](examples/cmake-add-subdirectory) / + [CMakeLists.txt](examples/cmake-add-subdirectory/CMakeLists.txt) +- Fetch Content: [Example Project](examples/cmake-fetchcontent) / + [CMakeLists.txt](examples/cmake-fetchcontent/CMakeLists.txt) +- Find Package: [Example Project](examples/cmake-find-package) / + [CMakeLists.txt](examples/cmake-find-package/CMakeLists.txt) Locale Independent Parsing -------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rapidcsv-8.89/cmake/rapidcsvConfig.cmake.in new/rapidcsv-8.92/cmake/rapidcsvConfig.cmake.in --- old/rapidcsv-8.89/cmake/rapidcsvConfig.cmake.in 1970-01-01 01:00:00.000000000 +0100 +++ new/rapidcsv-8.92/cmake/rapidcsvConfig.cmake.in 2026-01-18 07:13:16.000000000 +0100 @@ -0,0 +1,3 @@ +@PACKAGE_INIT@ + +include("${CMAKE_CURRENT_LIST_DIR}/rapidcsvTargets.cmake") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rapidcsv-8.89/examples/cmake-find-package/CMakeLists.txt new/rapidcsv-8.92/examples/cmake-find-package/CMakeLists.txt --- old/rapidcsv-8.89/examples/cmake-find-package/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/rapidcsv-8.92/examples/cmake-find-package/CMakeLists.txt 2026-01-18 07:13:16.000000000 +0100 @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.11 FATAL_ERROR) +project(cmake-find-package) +set(CMAKE_CXX_STANDARD 11) + +find_package(rapidcsv REQUIRED) +add_executable(exprog3 src/exprog3.cpp) +target_link_libraries(exprog3 PRIVATE rapidcsv::rapidcsv) + +install(TARGETS exprog3 DESTINATION bin) +add_custom_target(uninstall + COMMAND "${CMAKE_COMMAND}" -E remove "${CMAKE_INSTALL_PREFIX}/bin/exprog2" +) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rapidcsv-8.89/examples/cmake-find-package/README.md new/rapidcsv-8.92/examples/cmake-find-package/README.md --- old/rapidcsv-8.89/examples/cmake-find-package/README.md 1970-01-01 01:00:00.000000000 +0100 +++ new/rapidcsv-8.92/examples/cmake-find-package/README.md 2026-01-18 07:13:16.000000000 +0100 @@ -0,0 +1,10 @@ +CMake Find Package Example Project +================================== + +Build Steps +----------- +Commands to build the example project: + + pushd ../../ ; ./make.sh install ; popd + mkdir -p build && cd build && cmake .. && make + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rapidcsv-8.89/examples/cmake-find-package/src/exprog3.cpp new/rapidcsv-8.92/examples/cmake-find-package/src/exprog3.cpp --- old/rapidcsv-8.89/examples/cmake-find-package/src/exprog3.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/rapidcsv-8.92/examples/cmake-find-package/src/exprog3.cpp 2026-01-18 07:13:16.000000000 +0100 @@ -0,0 +1,11 @@ +#include <iostream> +#include <vector> +#include <rapidcsv.h> + +int main() +{ + rapidcsv::Document doc("../../colhdr.csv"); + + std::vector<float> col = doc.GetColumn<float>("Close"); + std::cout << "Read " << col.size() << " values." << std::endl; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rapidcsv-8.89/src/rapidcsv.h new/rapidcsv-8.92/src/rapidcsv.h --- old/rapidcsv-8.89/src/rapidcsv.h 2025-08-16 14:35:16.000000000 +0200 +++ new/rapidcsv-8.92/src/rapidcsv.h 2026-01-18 07:13:16.000000000 +0100 @@ -2,9 +2,9 @@ * rapidcsv.h * * URL: https://github.com/d99kris/rapidcsv - * Version: 8.89 + * Version: 8.92 * - * Copyright (C) 2017-2025 Kristofer Berggren + * Copyright (C) 2017-2026 Kristofer Berggren * All rights reserved. * * rapidcsv is distributed under the BSD 3-Clause license, see LICENSE for details. @@ -133,6 +133,8 @@ void ToStr(const T& pVal, std::string& pStr) const { if (typeid(T) == typeid(int) || + typeid(T) == typeid(short) || + typeid(T) == typeid(unsigned short) || typeid(T) == typeid(long) || typeid(T) == typeid(long long) || typeid(T) == typeid(unsigned) || @@ -157,6 +159,18 @@ out << std::setprecision(17) << pVal; pStr = out.str(); } + else if (typeid(T) == typeid(signed char)) + { + std::ostringstream out; + out << static_cast<int>(pVal); + pStr = out.str(); + } + else if (typeid(T) == typeid(unsigned char)) + { + std::ostringstream out; + out << static_cast<unsigned int>(pVal); + pStr = out.str(); + } else { throw no_converter(); @@ -177,6 +191,26 @@ pVal = static_cast<T>(std::stoi(pStr)); return; } + else if (typeid(T) == typeid(signed char)) + { + pVal = static_cast<T>(std::stoi(pStr)); + return; + } + else if (typeid(T) == typeid(unsigned char)) + { + pVal = static_cast<T>(std::stoi(pStr)); + return; + } + else if (typeid(T) == typeid(short)) + { + pVal = static_cast<T>(std::stoi(pStr)); + return; + } + else if (typeid(T) == typeid(unsigned short)) + { + pVal = static_cast<T>(std::stoi(pStr)); + return; + } else if (typeid(T) == typeid(long)) { pVal = static_cast<T>(std::stol(pStr)); @@ -1045,7 +1079,17 @@ void RemoveRow(const size_t pRowIdx) { const size_t dataRowIdx = GetDataRowIndex(pRowIdx); - mData.erase(mData.begin() + static_cast<int>(dataRowIdx)); + if (dataRowIdx < mData.size()) + { + mData.erase(mData.begin() + static_cast<int>(dataRowIdx)); + } + else + { + const std::string errStr = "row out of range: " + + std::to_string(pRowIdx); + throw std::out_of_range(errStr); + } + UpdateRowNames(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rapidcsv-8.89/tests/test036.cpp new/rapidcsv-8.92/tests/test036.cpp --- old/rapidcsv-8.89/tests/test036.cpp 2025-08-16 14:35:16.000000000 +0200 +++ new/rapidcsv-8.92/tests/test036.cpp 2026-01-18 07:13:16.000000000 +0100 @@ -1,4 +1,4 @@ -// test036.cpp - supported datatypes +// test036.cpp - get supported datatypes #include <rapidcsv.h> #include "unittest.h" @@ -17,6 +17,10 @@ "float,3.3E38\n" "double,1.6E308\n" "long double,1.6E308\n" + "signed char,-128\n" + "unsigned char,255\n" + "short,32767\n" + "unsigned short,65535\n" ; std::string path = unittest::TempPath(); @@ -42,6 +46,11 @@ long double longdoubleval = doc.GetCell<long double>(1, 8); unittest::ExpectTrue((longdoubleval > 1.5E308) && (longdoubleval < 1.7E308)); + + unittest::ExpectEqual(signed char, doc.GetCell<signed char>(1, 9), -128); + unittest::ExpectEqual(unsigned char, doc.GetCell<unsigned char>(1, 10), 255); + unittest::ExpectEqual(short, doc.GetCell<short>(1, 11), 32767); + unittest::ExpectEqual(unsigned short, doc.GetCell<unsigned short>(1, 12), 65535); } catch (const std::exception& ex) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rapidcsv-8.89/tests/test102.cpp new/rapidcsv-8.92/tests/test102.cpp --- old/rapidcsv-8.89/tests/test102.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/rapidcsv-8.92/tests/test102.cpp 2026-01-18 07:13:16.000000000 +0100 @@ -0,0 +1,46 @@ +// test102.cpp - exception message removing out-of-range row + +#include <rapidcsv.h> +#include "unittest.h" + +int main() +{ + int rv = 0; + + std::string csv = + "-,A,B,C,D\n" + "1,3,9,81,6561\n" + "2,4,16,256\n" + "3,9,81,6561\n" + ; + + std::string path = unittest::TempPath(); + unittest::WriteFile(path, csv); + + try + { + rapidcsv::Document doc(path, rapidcsv::LabelParams(0, 0)); + + doc.RemoveRow("1"); + unittest::ExpectEqual(std::string, doc.GetRowName(0), "2"); + + doc.RemoveRow("3"); + unittest::ExpectEqual(std::string, doc.GetRowName(0), "2"); + + // doc has row 2 (0) now, thus 1 is out of range. + ExpectExceptionMsg(doc.RemoveRow(1), std::out_of_range, + "row out of range: 1"); + + ExpectExceptionMsg(doc.RemoveRow("1"), std::out_of_range, + "row not found: 1"); + } + catch (const std::exception& ex) + { + std::cout << ex.what() << std::endl; + rv = 1; + } + + unittest::DeleteFile(path); + + return rv; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rapidcsv-8.89/tests/test103.cpp new/rapidcsv-8.92/tests/test103.cpp --- old/rapidcsv-8.89/tests/test103.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/rapidcsv-8.92/tests/test103.cpp 2026-01-18 07:13:16.000000000 +0100 @@ -0,0 +1,106 @@ +// test103.cpp - set supported datatypes + +#include <rapidcsv.h> +#include "unittest.h" + +int main() +{ + int rv = 0; + + std::string csvref = + "int,32767\n" + "long,2147483647\n" + "long long,9223372036854775807\n" + "unsigned,65535\n" + "unsigned long,4294967295\n" + "unsigned long long,18446744073709551615\n" + "float,3.40282347e+38\n" + "double,1.6e+308\n" + "long double,1.6e+308\n" + "signed char,-128\n" + "unsigned char,255\n" + "short,32767\n" + "unsigned short,65535\n" + ; + + std::string csv = + "int,0\n" + "long,0\n" + "long long,0\n" + "unsigned,0\n" + "unsigned long,0\n" + "unsigned long long,0\n" + "float,0\n" + "double,0\n" + "long double,0\n" + "signed char,0\n" + "unsigned char,0\n" + "short,0\n" + "unsigned short,0\n" + ; + + std::string path = unittest::TempPath(); + unittest::WriteFile(path, csv); + + try + { + rapidcsv::LabelParams labelParams(-1, -1); + rapidcsv::SeparatorParams separatorParams(',', false, rapidcsv::sPlatformHasCR, false, false /*pAutoQuote*/); + rapidcsv::Document doc(path, labelParams, separatorParams); + + // set cells + doc.SetCell<int>(1, 0, 32767); + doc.SetCell<long>(1, 1, 2147483647); + doc.SetCell<long long>(1, 2, 9223372036854775807); + + doc.SetCell<unsigned>(1, 3, 65535); + doc.SetCell<unsigned long>(1, 4, 4294967295); + doc.SetCell<unsigned long long>(1, 5, 18446744073709551615llu); + + doc.SetCell<float>(1, 6, 3.40282347e+38); + doc.SetCell<double>(1, 7, 1.6E308); + doc.SetCell<long double>(1, 8, 1.6E308); + + doc.SetCell<signed char>(1, 9, -128); + doc.SetCell<unsigned char>(1, 10, 255); + doc.SetCell<short>(1, 11, 32767); + doc.SetCell<unsigned short>(1, 12, 65535); + + // read back + unittest::ExpectEqual(int, doc.GetCell<int>(1, 0), 32767); + unittest::ExpectEqual(long, doc.GetCell<long>(1, 1), 2147483647); + unittest::ExpectEqual(long long, doc.GetCell<long long>(1, 2), 9223372036854775807); + + unittest::ExpectEqual(unsigned, doc.GetCell<unsigned>(1, 3), 65535); + unittest::ExpectEqual(unsigned long, doc.GetCell<unsigned long>(1, 4), 4294967295); + unittest::ExpectEqual(unsigned long long, doc.GetCell<unsigned long long>(1, 5), 18446744073709551615llu); + + float floatval = doc.GetCell<float>(1, 6); + unittest::ExpectTrue((floatval > 3.40E38) && (floatval < 3.45E38)); + + double doubleval = doc.GetCell<double>(1, 7); + unittest::ExpectTrue((doubleval > 1.5E308) && (doubleval < 1.7E308)); + + long double longdoubleval = doc.GetCell<long double>(1, 8); + unittest::ExpectTrue((longdoubleval > 1.5E308) && (longdoubleval < 1.7E308)); + + unittest::ExpectEqual(signed char, doc.GetCell<signed char>(1, 9), -128); + unittest::ExpectEqual(unsigned char, doc.GetCell<unsigned char>(1, 10), 255); + unittest::ExpectEqual(short, doc.GetCell<short>(1, 11), 32767); + unittest::ExpectEqual(unsigned short, doc.GetCell<unsigned short>(1, 12), 65535); + + // check full doc + doc.Save(); + std::string csvread = unittest::ReadFile(path); + unittest::ExpectEqual(std::string, csvref, csvread); + } + catch (const std::exception& ex) + { + std::cout << ex.what() << std::endl; + rv = 1; + } + + unittest::DeleteFile(path); + + return rv; +}
