Skip to content

feat(build)!: per-component options with mode-driven defaults#55

Open
EnriqueParodi wants to merge 1 commit into
mainfrom
feature/compilation-options
Open

feat(build)!: per-component options with mode-driven defaults#55
EnriqueParodi wants to merge 1 commit into
mainfrom
feature/compilation-options

Conversation

@EnriqueParodi

@EnriqueParodi EnriqueParodi commented May 23, 2026

Copy link
Copy Markdown
Collaborator

Component builds are gated via sen_internal_component_guard at the top of their CMakeLists. A coarse mode switch (barebones / basic / full) is used to gate them, and Conan's system requirements (imgui, sdl, libxext-dev, llhttp, pybind11, tracy, ...) are pulled only when their owning component is enabled.

Developer-facing flags (with_examples, with_tests, with_clang_tidy, with_coverage, with_docs, sanitizer) replace the ENABLE_* env vars. with_docs pulls doxygen via tool_requires.

cli_run's built-in presets (shell / replay / explorer) are conditionally baked in based on their SEN_BUILD_ flags. Example smoke tests skip configs whose required component is disabled.

BREAKING:

  • SEN_DISABLE_EXTRA_COMPONENTS removed; use -o sen/*:mode=basic.
  • ENABLE_CT / COVERAGE / EXAMPLES / TESTS / ASAN / TSAN env vars no longer honored; use the matching Conan options.

@EnriqueParodi
EnriqueParodi requested a review from vulder as a code owner May 23, 2026 21:12
@EnriqueParodi EnriqueParodi self-assigned this May 23, 2026
@EnriqueParodi
EnriqueParodi force-pushed the feature/compilation-options branch from 1571fa5 to 395b299 Compare May 23, 2026 21:22
Component selection is the only Conan-level decision: one `mode` option
(barebones, basic, full), resolved on demand, decides which components
compile and which dependencies get fetched.

Everything about how the tree is compiled moves to CMake flags on top
of the generated preset. We also retire environment toggles (like
ENABLE_TESTS, ENABLE_TSAN, ...). Docs builds depend on the
user.sen:build_docs conf set by the sen_build_docs profile, which
has the doxygen tool requirement.
@EnriqueParodi
EnriqueParodi force-pushed the feature/compilation-options branch from 395b299 to 74f39e9 Compare July 13, 2026 08:51

@vulder vulder left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The conan pipeline matrix needs to be extended to build all different modes, otherwise, we don't detect conan configuration errors/build inconsistencies.

Comment thread conanfile.py
settings = "os", "compiler", "build_type", "arch"

# Allow component discovery from the recipe folder.
exports = "components/*/CMakeLists.txt"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does this not also work by specifying it through the export_sources?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

In the Conan documentation it says that we should use exports for "files that should be exported and stored side by side with the conanfile.py file to make the recipe work", and use export_sources for files "that should be exported together with the recipe and will be available to generate the package." It also states that "Unlike exports attribute, these files shouldn’t be used by the conanfile.py Python code, but to compile the library or generate the final package".

So in this case, we are using these files for the conanfile.py to work, and therefore we use "exports".

R"(SELECT query_test.QueryTestClass FROM se.env WHERE currentStatus = "error")", api.getTypes());
bus->addSubscriber(enumInterest, &enumList_, true);

constexpr int maxTicks = 200; // ~2s at 100Hz

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

How is this tick rate change related to the conan rework?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It has nothing to do with the conan rework (as you already know). It is a very small fix on a test that was flaky, and that bited me in my local environment. The number of ticks (that can be sometimes too fast, depending on the environment) was too small (2 for the error detection and 10 for the cap). With this we should be save.

@EnriqueParodi

Copy link
Copy Markdown
Collaborator Author

The conan pipeline matrix needs to be extended to build all different modes, otherwise, we don't detect conan configuration errors/build inconsistencies.

Yes please, here's where we would need your help.

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