Conversation
|
@DockedFerret800, it looks like a more recent CMake is needed for the CI. Might need to be installed as part of the workflows if it ins't available in these current images. |
|
@stephenberry I've just pushed a fix. It was partially my fault that it wasn't running on modules workflow, as I forgot to specify compilers and it used GCC instead. We cannot test it on GCC as version 15 or above is required, and GitHub Actions runners don't have it yet. I expect GCC 16 to become available when Ubuntu 26 is released. For the old GCC and Clang workflow runners, I lowered the required version to 3.31, which is available on GitHub Actions runners. Please, approve workflows and we'll see if it works. If not - I'll use |
|
@stephenberry I've pushed a fix. The Windows workflows should be working now, I've switched to a Visual Studio generator. Unfortunately, we won't be able to test on Clang either, because the shipped std module files are broken. We'll have to wait for a new Ubuntu runner with the latest GCC, Clang and Ubuntu. I checked locally on Ubuntu WSL with Clang 21, and it built successfully. |
|
I had AI look at this PR and provide 3 suggestions:
The second point is simple to change. Do you think we can test the modules approach with CI? |
|
@stephenberry I pushed a commit to address the first two issues. Regarding the last one, I didn't quite get that one, we have a dedicated workflow that tests modules and forces import instead of include: #ifndef UT_ENABLE_MODULES
#include "ut/ut.hpp"
#else
import ut;
#endif |
|
I think I got what it meant, I pushed a dedicated unconditional import test file. |
|
@stephenberry Would you like me to remove dead code in ut.hpp as well? |
|
@DockedFerret800, go for it! I think this is about ready to merge. |
|
@DockedFerret800, thanks for your help on this. I'm merging and I'll make a new release. |
|
@stephenberry Thank you for reviewing and merging. I'll now continue with Glaze. |
This PR adds optional native-modules support. Since the library is small, I decided to just create separate files with native modules, without wrappers. This will also mean that in the future, in case you decide to drop header support, this would be easier. Modules integration was tested on MSVC (14.51) and Clang 21 in Ubuntu WSL, with all tests passing.
This adds two new CMake options:
UT_ENABLE_MODULES: to enable modules.UT_COMPILE_TIME: to enable compile-time features. This had to be moved to options due to the nature of modules.This also adds a new workflow file to test on MSVC 14.50 and Clang 18. GCC is not tested, as GitHub Actions currently doesn't support GCC 15, which is required for
import std. This should be resolved when Ubuntu 26 is released.This PR is also needed for the Glaze integration (stephenberry/glaze#1586).