Skip to content

[cpp] Refactor codegen, use shared_ptr for messages, renamed classes for consistency with other languages - #473

Draft
daantimmer wants to merge 54 commits into
mainfrom
cpp-breaking-change-use-shared_ptrs-for-messages
Draft

[cpp] Refactor codegen, use shared_ptr for messages, renamed classes for consistency with other languages#473
daantimmer wants to merge 54 commits into
mainfrom
cpp-breaking-change-use-shared_ptrs-for-messages

Conversation

@daantimmer

@daantimmer daantimmer commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🤔 What's changed?

  • codegen has been updated with the following changes: (See note)
    • removed the need for the camelize function..
    • all messages referencing/consisting of other messages are now storing them as a std::shared_ptr, this is an important feature enabler for proper implementation of cucumber/query/cpp
  • tests have been updated to test
    • nlohmann/json.hpp should not be included in the public headers
  • added naming conventions to clang-tidy

⚡️ What's your motivation?

The change to shared_ptr is a required change for creating cucumber/query's CPP implementation. This is a breaking change for all projects depending on cucumber/messages/cpp.

🏷️ What kind of change is this?

  • 🏦 Refactoring/debt/DX (improvement to code design, tooling, etc. without changing behaviour)
  • ⚡ New feature (non-breaking change which adds new behaviour)
  • 💥 Breaking change (incompatible changes to the API)

♻️ Anything particular you want feedback on?

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

@daantimmer daantimmer changed the title Cpp breaking change use shared ptrs for messages [cpp] Refactor codegen, use shared_ptr for messages, renamed classes for consistency with other languages Jul 3, 2026
@daantimmer
daantimmer changed the base branch from refactor-cpp-codegen to main July 3, 2026 10:53
@daantimmer
daantimmer force-pushed the cpp-breaking-change-use-shared_ptrs-for-messages branch 3 times, most recently from 67ee586 to fd37c6c Compare July 7, 2026 14:51
daantimmer and others added 20 commits July 8, 2026 12:29
* use conan as dependency manager

* run on all branches

* setup correct actions/setup-python

* refactor: update CMake presets and workflow for Conan integration

* reconfigure conan settings and CI setup

* fix C++ version setting

* pin run-vcpkg to sha

* fix vcpkg

* fix packages-macos

* fix conan unix installation steps

* get conan builds working

* update conan commands to build with C++17 and propagate C++17 requirement in CMake

* update CMake command to use Ninja generator for build process

* cleanup ci

* fix codeql
- Change CompilationDatabase path in .clangd to current directory
- Add compile_commands.json to .gitignore
- Create custom target for clangd compile commands in CMakeLists.txt
- Update find_package for nlohmann_json and cucumber_messages
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