Skip to content

Try to fix some problems I found while testing with copier - #6

Open
ClausKlein wants to merge 5 commits into
steve-downey:copierfrom
ClausKlein:feature/copier
Open

ClausKlein wants to merge 5 commits into
steve-downey:copierfrom
ClausKlein:feature/copier

Conversation

@ClausKlein

Copy link
Copy Markdown
bash-5.3$ copier update --skip-answered --trust --vcs-ref HEAD 
Updating to template version 2.4.1.post32.dev0+54be23e
Formatting 4 CMake file(s) with gersemi 0.28.0...
Warning: unknown command 'beman_install_library' used at:
/private/var/folders/wb/ckvxxgls5db7qyhqq4y5_l1c0000gq/T/copier._main.old_copy.07omdmva/CMakeLists.txt:80:1

Warning: unknown command 'configure_build_telemetry' used at:
/private/var/folders/wb/ckvxxgls5db7qyhqq4y5_l1c0000gq/T/copier._main.old_copy.07omdmva/CMakeLists.txt:81:1

Formatting 6 C/C++ file(s) with clang-format 22.1.8...
Formatting 4 CMake file(s) with gersemi 0.28.0...
Warning: unknown command 'beman_install_library' used at:
/Users/clausklein/Workspace/cpp/beman-project/my_project_name/CMakeLists.txt:80:1

Warning: unknown command 'configure_build_telemetry' used at:
/Users/clausklein/Workspace/cpp/beman-project/my_project_name/CMakeLists.txt:81:1

Formatting 6 C/C++ file(s) with clang-format 22.1.8...
Formatting 4 CMake file(s) with gersemi 0.28.0...
Warning: unknown command 'beman_install_library' used at:
/private/var/folders/wb/ckvxxgls5db7qyhqq4y5_l1c0000gq/T/copier._main.new_copy.kasvjewb/CMakeLists.txt:80:1

Warning: unknown command 'configure_build_telemetry' used at:
/private/var/folders/wb/ckvxxgls5db7qyhqq4y5_l1c0000gq/T/copier._main.new_copy.kasvjewb/CMakeLists.txt:81:1

Formatting 6 C/C++ file(s) with clang-format 22.1.8...
Make sure Git >= 2.24 is installed to improve updates.
bash-5.3$ git diff
diff --cc .exemplar_version
index f8cadbe,a84d365..0000000
--- a/.exemplar_version
+++ b/.exemplar_version
@@@ -1,1 -1,1 +1,5 @@@
++<<<<<<< before updating
 +v2.4.1-31-ga07b85d
++=======
+ v2.4.1-32-g54be23e
++>>>>>>> after updating
diff --git a/.copier-answers.yml b/.copier-answers.yml
index 7bee833..251384d 100644
--- a/.copier-answers.yml
+++ b/.copier-answers.yml
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 # Standard answers and internal state managed by Copier
-_commit: v2.4.1-31-ga07b85d
+_commit: v2.4.1-32-g54be23e
 _src_path: gh:ClausKlein/exemplar
 description: Short project description.
 maintainer: ClausKlein
bash-5.3$ 

Sync with pre-cmmmit config files versions with format_project.sh
@ClausKlein
ClausKlein requested a review from steve-downey as a code owner July 26, 2026 11:15
@ClausKlein ClausKlein changed the title Try to fix some problems i found while testing with copier Try to fix some problems I found while testing with copier Jul 26, 2026
Comment thread copier/check_copier.sh
Comment thread copier.yml
rm "examples/identity_as_default_projection.cpp";
mv "tests/beman/{{ project_name }}/identity.test.cpp" "tests/beman/{{ project_name }}/todo.test.cpp";
git ls-remote https://github.com/bemanproject/exemplar.git HEAD | awk '{print $1}' > .exemplar_version;
grep _commit: .copier-answers.yml | awk '{print $2}' > .exemplar_version;

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be correct: this allow to test a clone of this repo too with CI

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are any of the tools that look at .exemplar_version going to be unhappy if that's not a commit on https://github.com/bemanproject/exemplar.git ?
I don't see anything that reads it in https://github.com/search?q=org%3Abemanproject++.exemplar_version&type=code so it shouldn't, or it's someone else's problem.

@steve-downey steve-downey left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things, one important,

  • the command in the README to run copier needs a tweak
  • I'd rather fix the versions on main, first. PR shortly for that.

Comment thread copier/check_copier.sh
Comment thread template/README.md.jinja Outdated
Comment thread .pre-commit-config.yaml Outdated
@ClausKlein
ClausKlein requested a review from steve-downey July 26, 2026 21:45
Comment on lines +63 to +69
# NOTE: import std; needs at leased cmake v3.31! CK
cmake_version: ["~3.31.10", "~4.0.3", "~4.1.3", "~4.2.3", "~4.3.2", "~4.4.0"]
steps:
- uses: actions/checkout@v4
- uses: lukka/get-cmake@latest
with:
cmakeVersion: ${{ matrix.cmake_version }} # ~3.30.9 --> use most recent 3.30.x version

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: This seems better to me.

Comment thread template/.github/workflows/ci_tests.yml.jinja Outdated
@ClausKlein

ClausKlein commented Jul 27, 2026 •

Copy link
Copy Markdown
Author

@steve-downey
We have also a problem with the configured minimum_cpp_build_version=23!

It generates this code:

    set_target_properties(beman.my_project_name PROPERTIES CXX_MODULE_STD ON)
    target_compile_features(beman.my_project_name PUBLIC cxx_std_23)

I added an automatic find-package-test with this results:

https://github.com/ClausKlein/turbo-adventure/actions/runs/30287993003

To fix the CI tests it must be changed to:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c51a2b4..8670b72 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -63,7 +63,7 @@ if(BEMAN_MY_PROJECT_NAME_USE_MODULES)
                     "${CMAKE_CURRENT_BINARY_DIR}/include"
     )
     set_target_properties(beman.my_project_name PROPERTIES CXX_MODULE_STD ON)
-    target_compile_features(beman.my_project_name PUBLIC cxx_std_23)
+    target_compile_features(beman.my_project_name PUBLIC cxx_std_${CMAKE_CXX_STANDARD})
 else()
     target_sources(
         beman.my_project_name

@ClausKlein

Copy link
Copy Markdown
Author

And we should add this I think pre-commit hooks:
ClausKlein/turbo-adventure@e05bf7c

@ClausKlein

ClausKlein commented Jul 28, 2026 •

Copy link
Copy Markdown
Author

Please note too https://github.com/ClausKlein/turbo-adventure/pull/2/changes

IMHO: we should add some notes about to update with copier in CONTRIBUTING.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants