ericniebler / range-v3

Range library for C++14/17/20, basis for C++20's std::ranges
Other
4.06k stars 437 forks source link

Unused and broken test files #1712

Open Klaim opened 2 years ago

Klaim commented 2 years ago

While preparing the build2 package for range-v3 v0.12.0 I discovered that test/algorithm/partition_move.cpp is not referred anywhere in CMake files. It also attempts to include a header that does not exist: #include <range/v3/algorithm/partition_move.hpp>

It is not clear to me if this file

I also found copy_n.cpp and fill_n.cpp as not being referred by CMake files either and having their code not compiling because of errors about accessing inexistent members of this library's types (which suggests they are just not in sync with the current headers).


For context, build2 being a build-system in addition to a package manager, we re-defined the build of the library and its tests by following (as best as we can) the instructions from the CMakeFiles.txt files. However we use globing patterns as much as we can instead of manually listing files (which makes our build files quite short). Currently the rule will take any cpp file in test/** and generate an executable named the same way as the file, which is the pattern we observe in the CMakeFiles.txt for tests and which allow us to not have much to change in build2 files when packaging a new version (new files are automatically added, removed files are automatically removed). However this means that files which are not listed in CMakeFiles.txt but that do exist, like partition_move.cpp refered here, will be built by build2 and this currently lead to the build failing because of the missing header.

For now I'm adding some exclusion in the build2 script to simply not compile these files, so I can publish v0.12.0, so this is not preventing me from working.