feat(build)!: per-component options with mode-driven defaults#55
feat(build)!: per-component options with mode-driven defaults#55EnriqueParodi wants to merge 1 commit into
Conversation
1571fa5 to
395b299
Compare
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.
395b299 to
74f39e9
Compare
vulder
left a comment
There was a problem hiding this comment.
The conan pipeline matrix needs to be extended to build all different modes, otherwise, we don't detect conan configuration errors/build inconsistencies.
| settings = "os", "compiler", "build_type", "arch" | ||
|
|
||
| # Allow component discovery from the recipe folder. | ||
| exports = "components/*/CMakeLists.txt" |
There was a problem hiding this comment.
Does this not also work by specifying it through the export_sources?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
How is this tick rate change related to the conan rework?
There was a problem hiding this comment.
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.
Yes please, here's where we would need your help. |
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: