CMake version 3.28.3, which is the default on Ubuntu 24.04, if that turns out to matter.
The outcome is that Trieste can't checkout its desired commit of snmalloc, and build file generation fails.
The key issue seems to be GIT_SHALLOW TRUE in the FetchContent_Declare command in the CMakeLists.txt.
I found a long and complicated discussion among CMake devs which repeatedly hints that this should never be used with git hashes (https://gitlab.kitware.com/cmake/cmake/-/issues/17770), and a recent commit to main here seems to have done just that.
The simple fix would therefore be to delete the GIT_SHALLOW flag and add a comment on this whole situation... or switch to a named branch, but I see why tracking main like it used to would be problematic.
@mjp41 I think perhaps the preferred approach would be to start tagging snmalloc commits as releases, and then we can keep using shallow checkouts (I believe, if I'm understanding this correctly). Thoughts?
To reproduce:
mkdir build && cd builde && cmake ..
The outcome is that Trieste can't checkout its desired commit of snmalloc, and build file generation fails.
The key issue seems to be
GIT_SHALLOW TRUE
in theFetchContent_Declare
command in theCMakeLists.txt
. I found a long and complicated discussion among CMake devs which repeatedly hints that this should never be used with git hashes (https://gitlab.kitware.com/cmake/cmake/-/issues/17770), and a recent commit to main here seems to have done just that.The simple fix would therefore be to delete the
GIT_SHALLOW
flag and add a comment on this whole situation... or switch to a named branch, but I see why tracking main like it used to would be problematic.