Skip to content

Update#4

Closed
koudis wants to merge 1 commit intomasterfrom
BAF-1090/local_repository
Closed

Update#4
koudis wants to merge 1 commit intomasterfrom
BAF-1090/local_repository

Conversation

@koudis
Copy link
Contributor

@koudis koudis commented Aug 29, 2025

Summary by CodeRabbit

  • New Features

    • Added CMCONF-based system initialization to support global configuration and dependency retrieval during build setup.
  • Documentation

    • Overhauled setup guide to use CMCONF workflows, including selecting a system, configuring, and installing global configuration.
    • Added a configuration guide with install/uninstall steps and instructions for renaming the system.
    • Updated build instructions (removed parallel make flag) and refreshed links and anchors.
    • Clarified install/dependency comments in build scripts.
  • Chores

    • Reordered initialization and dependency configuration to align with CMCONF usage.

@coderabbitai
Copy link

coderabbitai bot commented Aug 29, 2025

Walkthrough

Introduces CMCONF as a required CMLIB component, initializes the EXAMPLE CMCONF system, and reorders storage variable setup. Updates README guidance toward CMCONF-based configuration and adds a new config/README.md. CMakeLists.txt comments are clarified without behavior changes.

Changes

Cohort / File(s) Summary
CMCONF integration in storage config
CMLibStorage.cmake
Added FIND_PACKAGE(CMLIB REQUIRED COMPONENTS CMCONF), initialized CMCONF via CMCONF_INIT_SYSTEM(EXAMPLE), enabled CMCONF_GET usage, and moved SET(STORAGE_LIST DEP) after initialization.
CMake comments update
CMakeLists.txt
Adjusted comments for install target and dependency notes; no functional changes.
Docs: shift to CMCONF workflow
README.md
Overhauled requirements and template usage to CMCONF-centric setup; updated links/anchors; simplified build command (removed -j 8).
New EXAMPLE configuration guide
config/README.md
Added guide for installing/uninstalling EXAMPLE config, renaming system, and related cross-links.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Dev as Developer
  participant CMake as CMake (Project)
  participant CMLIB as CMLIB
  participant CMCONF as CMCONF

  Dev->>CMake: Configure project
  CMake->>CMLIB: find_package(CMLIB COMPONENTS CMCONF)
  CMLIB-->>CMake: CMLIB + CMCONF available
  CMake->>CMCONF: CMCONF_INIT_SYSTEM(EXAMPLE)
  CMCONF-->>CMake: System initialized
  CMake->>CMake: SET(STORAGE_LIST DEP)
  CMake-->>Dev: Configuration complete
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Add CMCONF system configuration #3 — Similar update to CMLibStorage.cmake adding CMCONF dependency and initializing the EXAMPLE system; mirrors this PR’s storage/config flow change.

Poem

I thump the ground: “CMCONF’s here!”
New paths align, the build is clear.
I stash my deps, a tidy burrow,
EXAMPLE squeaks, “Init tomorrow?”
With docs refreshed and comments bright,
I hop—configure—everything’s right. 🐇✨

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BAF-1090/local_repository

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbit in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbit in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbit gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbit read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbit help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbit ignore or @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbit summary or @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbit or @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🧹 Nitpick comments (6)
CMLibStorage.cmake (1)

3-8: Tighten comment wording for clarity.

Minor grammar/style improvements.

-#
-# Initialize the system so the Package Tracker
-# can use CMCONF_GET.
-# The Configuration needs to be installed. See config/README.md
-#
+#
+# Initialize the system so the Package Tracker can use CMCONF_GET.
+# The configuration must be installed; see config/README.md.
+#
CMakeLists.txt (1)

37-37: Capitalize “CMake”.

Nit: proper noun.

-# Install created target with all needed cmake package files
+# Install created target with all needed CMake package files
config/README.md (2)

26-29: Polish the rename steps and punctuation.

-- Rename `CMCONF_EXAMPLEConfig.cmake` to `CMCONF_XConfig.cmake`,
-- Rename `EXAMPLE` to `X` in `CMCONF_XConfig.cmake`,
-- Rename `EXAMPLE` to `X` in `CMLibStorage.cmake`.
-- Install `CMCONF_XConfig.cmake` as described above.
+- Rename `CMCONF_EXAMPLEConfig.cmake` to `CMCONF_XConfig.cmake`.
+- Replace `EXAMPLE` with `X` in `CMCONF_XConfig.cmake`.
+- Replace `EXAMPLE` with `X` in `CMLibStorage.cmake`.
+- Install `CMCONF_XConfig.cmake` as described above.

33-38: Remove unused link reference definitions or reference them in the text.

MD053 flagged unused references (“Package Tracker”, “CMCONF”).

 [CMCONF_EXAMPLEConfig.cmake]: https://github.com/bacpack-system/package-tracker/example/config
-[Package Tracker]: https://github.com/bacpack-system/package-tracker
 [Package Tracker Example]: https://github.com/bacpack-system/package-tracker/example
-[CMCONF]: https://github.com/cmakelib/cmakelib-component-cmconf
 [CMake-lib]: https://github.com/cmakelib/cmakelib
 [example usage documentation]: https://bacpack-system.github.io/example_usage

Also consider linking directly to the specific CMCONF_EXAMPLEConfig.cmake file (not just the directory).

README.md (2)

20-26: Add language to fenced code block for syntax highlighting.

-```
+```bash
 mkdir -p _build && cd _build
 cmake ../
-make
+make

---

`25-25`: **Portability suggestion: prefer generator-agnostic build command.**


Use:

cmake --build . --parallel

This works across make/ninja/MSBuild and keeps parallelism configurable.

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: CodeRabbit UI

**Review profile**: CHILL

**Plan**: Pro

**💡 Knowledge Base configuration:**

- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between ffed1868a9b44e5f477126459b47e0a3f7b6c0a1 and 4763997358375abf1c82d43f47a22bf22621d481.

</details>

<details>
<summary>📒 Files selected for processing (4)</summary>

* `CMLibStorage.cmake` (1 hunks)
* `CMakeLists.txt` (1 hunks)
* `README.md` (1 hunks)
* `config/README.md` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧠 Learnings (3)</summary>

<details>
<summary>📓 Common learnings</summary>

Learnt from: mikusaq
PR: #3
File: CMLibStorage.cmake:1-5
Timestamp: 2025-08-27T10:45:25.292Z
Learning: In this codebase, duplicate FIND_PACKAGE(CMLIB COMPONENTS CMCONF REQUIRED) and CMCONF_INIT_SYSTEM() calls between CMLibStorage.cmake and config files are acceptable and not considered problematic.


</details>
<details>
<summary>📚 Learning: 2025-08-27T10:45:25.292Z</summary>

Learnt from: mikusaq
PR: #3
File: CMLibStorage.cmake:1-5
Timestamp: 2025-08-27T10:45:25.292Z
Learning: In this codebase, duplicate FIND_PACKAGE(CMLIB COMPONENTS CMCONF REQUIRED) and CMCONF_INIT_SYSTEM() calls between CMLibStorage.cmake and config files are acceptable and not considered problematic.


**Applied to files:**
- `CMLibStorage.cmake`
- `config/README.md`

</details>
<details>
<summary>📚 Learning: 2025-08-27T10:46:50.236Z</summary>

Learnt from: mikusaq
PR: #3
File: config/CMCONF_EXAMPLEConfig.cmake:5-5
Timestamp: 2025-08-27T10:46:50.236Z
Learning: In this codebase, FIND_PACKAGE calls in CMCONF config files do not need guards to prevent redundant lookups, as the duplicate calls are part of the intended design pattern.


**Applied to files:**
- `CMLibStorage.cmake`

</details>

</details><details>
<summary>🪛 LanguageTool</summary>

<details>
<summary>README.md</summary>

[grammar] ~10-~10: There might be a mistake here.
Context: ...ments   - Dependencies build and stored in Package Repository.   see [example usag...

(QB_NEW_EN)

---

[grammar] ~11-~11: There might be a mistake here.
Context: ...ry.   see [example usage documentation]. - [CMCONF Global Configuration] installed a...

(QB_NEW_EN)

---

[style] ~34-~34: This phrase is redundant. Consider using “outside”.
Context: ...t of the project    and shall be stored outside of the project source tree. It highly depe...

(OUTSIDE_OF)

---

[grammar] ~35-~35: Ensure spelling is correct
Context: ... the system has the only     project it coukld make sense to be part of the project so...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

---

[grammar] ~35-~35: There might be a mistake here.
Context: ...e to be part of the project source tree.  1. Install Config.cmake as stated in [confi...

(QB_NEW_EN)

</details>
<details>
<summary>config/README.md</summary>

[grammar] ~6-~6: There might be a mistake here.
Context: ... Prerequisites  - [CMake-lib] installed, - prepare Package Repository as desribed b...

(QB_NEW_EN)

---

[grammar] ~7-~7: Ensure spelling is correct
Context: ...talled, - prepare Package Repository as desribed by [example usage documentation],  ## I...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

---

[grammar] ~28-~28: There might be a mistake here.
Context: ...EXAMPLE` to `X` in `CMLibStorage.cmake`. - Install `CMCONF_XConfig.cmake` as descri...

(QB_NEW_EN)

</details>

</details>
<details>
<summary>🪛 markdownlint-cli2 (0.17.2)</summary>

<details>
<summary>README.md</summary>

22-22: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

</details>
<details>
<summary>config/README.md</summary>

34-34: Link and image reference definitions should be needed
Unused link or image reference definition: "package tracker"

(MD053, link-image-reference-definitions)

---

36-36: Link and image reference definitions should be needed
Unused link or image reference definition: "cmconf"

(MD053, link-image-reference-definitions)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (3)</summary><blockquote>

<details>
<summary>CMLibStorage.cmake (2)</summary><blockquote>

`1-1`: **Requiring CMCONF explicitly is correct.**

Good move making CMCONF a hard dependency before using CMCONF_* APIs.

---

`8-10`: **No changes needed: system name matches default config**  
Verified that CMCONF_INIT_SYSTEM(EXAMPLE) in CMLibStorage.cmake aligns with the default EXAMPLE config as documented in config/README.md.

</blockquote></details>
<details>
<summary>CMakeLists.txt (1)</summary><blockquote>

`40-42`: **LGTM — clearer dependency comment.**

Comment accurately describes BA_PACKAGE_DEPS_IMPORTED intent.

</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

Comment on lines +6 to +7
- [CMake-lib] installed,
- prepare Package Repository as desribed by [example usage documentation],
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix typos in prerequisites.

Correct spelling and phrasing.

-- [CMake-lib] installed,
-- prepare Package Repository as desribed by [example usage documentation],
+- [CMake-lib] installed,
+- Prepare a Package Repository as described in the [example usage documentation],
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- [CMake-lib] installed,
- prepare Package Repository as desribed by [example usage documentation],
- [CMake-lib] installed,
- Prepare a Package Repository as described in the [example usage documentation],
🧰 Tools
🪛 LanguageTool

[grammar] ~6-~6: There might be a mistake here.
Context: ... Prerequisites - [CMake-lib] installed, - prepare Package Repository as desribed b...

(QB_NEW_EN)


[grammar] ~7-~7: Ensure spelling is correct
Context: ...talled, - prepare Package Repository as desribed by [example usage documentation], ## I...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
In config/README.md around lines 6 to 7, fix typos and awkward phrasing in the
prerequisites: change "CMake-lib" to a clearer term like "CMake library" (or
"CMake" if appropriate), correct "desribed" to "described", and rephrase
"prepare Package Repository as described by [example usage documentation]," to a
grammatically correct form such as "prepare the package repository as described
in the example usage documentation." Ensure capitalization is consistent (e.g.,
"package repository" unless a proper noun) and punctuation is proper.


## Install EXAMPLE Config

Lets reuse [CMCONF_EXAMPLEConfig.cmake] from [Package Tracker Example]
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Grammar: “Let's reuse …”.

-Lets reuse [CMCONF_EXAMPLEConfig.cmake] from [Package Tracker Example]
+Let's reuse [CMCONF_EXAMPLEConfig.cmake] from the [Package Tracker Example]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Lets reuse [CMCONF_EXAMPLEConfig.cmake] from [Package Tracker Example]
Let's reuse [CMCONF_EXAMPLEConfig.cmake] from the [Package Tracker Example]
🤖 Prompt for AI Agents
In config/README.md around line 11, fix the grammar of "Lets reuse
[CMCONF_EXAMPLEConfig.cmake] from [Package Tracker Example]" to use the
contraction "Let's reuse ...". Update the text to "Let's reuse
[CMCONF_EXAMPLEConfig.cmake] from [Package Tracker Example]" preserving links
and punctuation exactly as intended.

Comment on lines +10 to +13
- Dependencies build and stored in Package Repository.
see [example usage documentation].
- [CMCONF Global Configuration] installed and prepared

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix grammar in Requirements bullets.

-- Dependencies build and stored in Package Repository.
-  see [example usage documentation].
-- [CMCONF Global Configuration] installed and prepared
+- Dependencies are built and stored in a Package Repository —
+  see the [example usage documentation].
+- [CMCONF Global Configuration] is installed and prepared.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- Dependencies build and stored in Package Repository.
see [example usage documentation].
- [CMCONF Global Configuration] installed and prepared
- Dependencies are built and stored in a Package Repository
see the [example usage documentation].
- [CMCONF Global Configuration] is installed and prepared.
🧰 Tools
🪛 LanguageTool

[grammar] ~10-~10: There might be a mistake here.
Context: ...ments - Dependencies build and stored in Package Repository. see [example usag...

(QB_NEW_EN)


[grammar] ~11-~11: There might be a mistake here.
Context: ...ry. see [example usage documentation]. - [CMCONF Global Configuration] installed a...

(QB_NEW_EN)

🤖 Prompt for AI Agents
In README.md around lines 10 to 13, fix the grammar in the Requirements bullets:
change "Dependencies build and stored in Package Repository." to "Dependencies
are built and stored in the Package Repository." (or "Build and store
dependencies in the Package Repository." if imperative tone preferred),
capitalize "See [example usage documentation]" or rephrase to "See the [example
usage documentation].", and change "[CMCONF Global Configuration] installed and
prepared" to "Ensure [CMCONF Global Configuration] is installed and configured."
Apply these concise edits so each bullet is a grammatically correct sentence or
imperative instruction.

Comment on lines +30 to +38
Example project can be used as a starting point for other projects.

1. Choose in which [CMCONF] System the project will belong to.
1. Update Config.cmake as stated in [config/README.md]. Config.cmake shall not be, in most cases, part of the project
and shall be stored outside of the project source tree. It highly depends on usage - if the system has the only
project it coukld make sense to be part of the project source tree.
1. Install Config.cmake as stated in [config/README.md].
1. Update `CMakeLists.txt` as desired for the project needs.

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Tighten wording; fix typo “coukld”.

-Example project can be used as a starting point for other projects.
+The example project can be used as a starting point for other projects.
@@
-1. Update Config.cmake as stated in [config/README.md]. Config.cmake shall not be, in most cases, part of the project
-   and shall be stored outside of the project source tree. It highly depends on usage - if the system has the only 
-   project it coukld make sense to be part of the project source tree. 
+1. Update Config.cmake as stated in [config/README.md]. In most cases, Config.cmake should not be part of the project
+   and should be stored outside the project source tree. This depends on usage—if the system has only
+   one project, it could make sense to keep it in the project source tree.
@@
-More informations can be found in [example usage documentation].
+More information can be found in the [example usage documentation].
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Example project can be used as a starting point for other projects.
1. Choose in which [CMCONF] System the project will belong to.
1. Update Config.cmake as stated in [config/README.md]. Config.cmake shall not be, in most cases, part of the project
and shall be stored outside of the project source tree. It highly depends on usage - if the system has the only
project it coukld make sense to be part of the project source tree.
1. Install Config.cmake as stated in [config/README.md].
1. Update `CMakeLists.txt` as desired for the project needs.
The example project can be used as a starting point for other projects.
1. Choose in which [CMCONF] System the project will belong to.
1. Update Config.cmake as stated in [config/README.md]. In most cases, Config.cmake should not be part of the project
and should be stored outside the project source tree. This depends on usage—if the system has only
one project, it could make sense to keep it in the project source tree.
1. Install Config.cmake as stated in [config/README.md].
1. Update `CMakeLists.txt` as desired for the project needs.
More information can be found in the [example usage documentation].
🧰 Tools
🪛 LanguageTool

[style] ~34-~34: This phrase is redundant. Consider using “outside”.
Context: ...t of the project and shall be stored outside of the project source tree. It highly depe...

(OUTSIDE_OF)


[grammar] ~35-~35: Ensure spelling is correct
Context: ... the system has the only project it coukld make sense to be part of the project so...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~35-~35: There might be a mistake here.
Context: ...e to be part of the project source tree. 1. Install Config.cmake as stated in [confi...

(QB_NEW_EN)

🤖 Prompt for AI Agents
In README.md around lines 30-38, tighten wording and fix the typo "coukld":
rephrase the numbered steps for clarity and grammar (e.g., "Choose which
[CMCONF] system the project will belong to."), change "coukld" to "could", and
make the Config.cmake guidance concise and consistent (e.g., "In most cases
Config.cmake should be stored outside the project source tree; if the system
contains the only project it could be included in the source tree."), and
simplify installation reference to "Install Config.cmake as described in
config/README.md." Keep numbering/bullets consistent.

@koudis
Copy link
Contributor Author

koudis commented Aug 29, 2025

Not needed. Deleted.

@koudis koudis closed this Aug 29, 2025
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.

1 participant