microsoft / Trieste

A term rewriting system for experimental programming language development.
MIT License
37 stars 20 forks source link

CMake can't check out snmalloc on first run #120

Closed fhackett closed 2 months ago

fhackett commented 2 months ago

To reproduce:

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.

matajoh commented 2 months ago

@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?