Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update variant documentation #170

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

LeMollinger
Copy link
Contributor

No description provided.

@LeMollinger LeMollinger linked an issue Feb 4, 2025 that may be closed by this pull request
Copy link

github-actions bot commented Feb 4, 2025

Test Results

50 tests   50 ✅  7m 18s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit b9ca264.

♻️ This comment has been updated with latest results.

.readthedocs.yml Outdated
Copy link
Contributor Author

@LeMollinger LeMollinger Feb 4, 2025

Choose a reason for hiding this comment

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

This is only for checking if a newer version of poetry is responsible for the failing readthedocs build. In the last failing build, poetry v 2.0.1 has been used. Our lock file is generated by poetry v 1.8.5.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please use >=1.8 to make sure we also get the latest 1.x updates.

Copy link
Contributor Author

@LeMollinger LeMollinger Feb 11, 2025

Choose a reason for hiding this comment

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

using this syntax will result in readthedocsbuild failing again. Instead, i used pip install poetry~=1.8
This will allow us to use all the 1.x versions of poetry, but not 2.x

Copy link
Contributor

@jomal77 jomal77 left a comment

Choose a reason for hiding this comment

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

For what I can judge, it is written comprehensible and clear.
I read the text, however, I did not try out those steps to validate.

TODO: write this section
In this guide, we will show you how to configure a new variant of your software project.
Some of these steps are also explained in the :ref:`"Hello World" Tutorial <hello_world>`.
However, this guide will provide a more detailed explanation of the variant specific configuration processes.
Copy link
Contributor

Choose a reason for hiding this comment

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

processes can be removed or?

@@ -1,4 +1,172 @@
How to Start Working on a :ref:`Variant <glossary_variant>`
###########################################################

TODO: write this section
In this guide, we will show you how to configure a new variant of your software project.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is better if we talk about SPLs and not about projects. We would like to switch focus from a project to a product.


<project root>
└── variants
└── my
Copy link
Contributor

Choose a reason for hiding this comment

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

Use one one directory for the variant name. SPL-Core supports variants with one directory, e.g. variants/var1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i got this from the "Hello World" Tutorial

spl_add_component(src/comp1)
spl_add_component(src/comp2)

This SPL Core specific macro is responsible for automatically including the components during the build process.
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a reference to the spl_add_component macro documentation.

.. code-block:: cmake

# Include the variant specific parts
include(${CMAKE_SOURCE_DIR}/variants/${VARIANT}/parts.cmake)
Copy link
Contributor

Choose a reason for hiding this comment

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

Mention that this file must be included after the spl_core cmake is included. In this way the spl macros are visible and the ${VARIANT} variable is defined.

...
endmenu

Use ``KConfig``'s graphical user interface to create the corresponding ``config.txt`` file for your variant.
Copy link
Contributor

Choose a reason for hiding this comment

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

How to start the KConfig GUI?

Select your features - ``KConfig`` and ``config.txt``
*****************************************************

The ``config.txt`` file contains a list of features which are part of your variant. This file is automatically created with ``KConfig``.
Copy link
Contributor

Choose a reason for hiding this comment

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

Explain somehow that the KConfig file describes the SPL feature model and that config.txt stores the specific selection of features for the variant.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've just read this explanation at the end of the section... maybe you move it at the top of the section.

├── config.cmake
└── ...

You have to include this file in the ``CMakeLists.txt`` file of your project root.
Copy link
Contributor

Choose a reason for hiding this comment

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

Because this file defines the toolchain and/or options, it must be included in the CMakeLists.txt before the project() macro is called.

if(BUILD_KIT STREQUAL prod)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
message(STATUS "Configuring Debug build")
set(BUILD_OUT_PATH build/default_Debug)
Copy link
Contributor

Choose a reason for hiding this comment

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

I do not like that for a specific configuration the build output path is "special".
I would not have this as an example.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

would it be sufficient to remove the line about the special output path? Personally, i like to see that someone can configure build_kit specifics. I would leave then the "message(STATUS ....)" line inside.

As a precondition to this guide, you should have a project with at least one component set up and configured.
If you haven't done this yet, please refer to the guide on how to :ref:`start working on a component <start_new_component>`.

Variant directory structure
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add an overview with the most common use cases for variant specific configuration:

  • relevant components
  • feature selection
  • toolchain and options
  • misc

@LeMollinger LeMollinger force-pushed the 169-update-documentation-of-spl-core branch 2 times, most recently from dc194f6 to abff7d1 Compare February 11, 2025 07:58
@LeMollinger LeMollinger force-pushed the 169-update-documentation-of-spl-core branch from abff7d1 to b9ca264 Compare February 11, 2025 08:06
@LeMollinger LeMollinger requested review from cuinixam and removed request for cuinixam February 11, 2025 15:10
@LeMollinger LeMollinger dismissed cuinixam’s stale review February 12, 2025 07:35

I adapted all the requested changes. Now, I just want to merge it.

@LeMollinger LeMollinger merged commit 980bee1 into develop Feb 12, 2025
5 checks passed
@LeMollinger LeMollinger deleted the 169-update-documentation-of-spl-core branch February 12, 2025 07:37
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.

update documentation of spl-core
3 participants