Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
1f7ce04
jinja2
AlexInLog Sep 4, 2025
b160606
Update ci v2.yml
AlexInLog Sep 4, 2025
f1f5f46
Update ci v2.yml
AlexInLog Sep 4, 2025
4a8849f
Update ci v2.yml
AlexInLog Sep 4, 2025
1d72546
Update ci v2.yml
AlexInLog Sep 4, 2025
097f3b9
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 4, 2025
960d5b1
Update ci v2.yml
AlexInLog Sep 5, 2025
71da089
Update ci v2.yml
AlexInLog Sep 5, 2025
2273c54
Update ci v2.yml
AlexInLog Sep 5, 2025
af82c9a
Update ci v2.yml
AlexInLog Sep 5, 2025
5833f8b
Update ci v2.yml
AlexInLog Sep 5, 2025
ac42aa6
Update ci v2.yml
AlexInLog Sep 5, 2025
b13606c
Update conanfile.py
AlexInLog Sep 5, 2025
b477668
Update ci v2.yml
AlexInLog Sep 5, 2025
394508d
Update conanfile.py
AlexInLog Sep 5, 2025
c063a95
Update conanfile.py
AlexInLog Sep 5, 2025
aa66073
Update CMakePresets.json
AlexInLog Sep 5, 2025
260b921
Update conanfile.py
AlexInLog Sep 5, 2025
939f91f
Update conanfile.py
AlexInLog Sep 5, 2025
6ced3b4
Update conanfile.py
AlexInLog Sep 5, 2025
3bcdd0f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 5, 2025
7fc86ec
Update conanfile.py
AlexInLog Sep 5, 2025
b9c1264
Update conanfile.py
AlexInLog Sep 5, 2025
a2c0ce7
Update conanfile.py
AlexInLog Sep 5, 2025
a933311
Update conanfile.py
AlexInLog Sep 5, 2025
7a75fbb
Update conanfile.py
AlexInLog Sep 6, 2025
5c1f160
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 6, 2025
a8ffbec
Update conanfile.py
AlexInLog Sep 6, 2025
ddbe8db
sfml
AlexInLog Sep 6, 2025
ed57cf5
disable windows for now
AlexInLog Sep 9, 2025
bef3e69
Update analyzers.yml
AlexInLog Sep 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ci v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ jobs:
fetch-depth: 0

- uses: actions/setup-python@v5
with:
python-version: '3.6.x - 3.11.x'
with: { python-version: "3.8" }

- name: get conan
uses: turtlebrowser/get-conan@main
Expand Down
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"inherits" : ["ci-flags"],
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-fno-rtti -Wall -Werror -Wextra -Wpedantic -Wcast-qual -Wformat=2 -Wundef -Werror=float-equal -Wno-gnu-zero-variadic-macro-arguments -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-unknown-warning-option"
"CMAKE_CXX_FLAGS": "-fno-rtti -Wall -Werror -Wextra -Wpedantic -Wcast-qual -Wformat=2 -Wundef -Werror=float-equal -Wno-gnu-zero-variadic-macro-arguments -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-unknown-warning-option -Wno-missing-template-arg-list-after-template-kw"
}
},
{
Expand Down
18 changes: 18 additions & 0 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ class RppConan(ConanFile):
"with_asio" : False
}

def configure(self):
self.options["grpc/*"].with_libsystemd = False
self.options["grpc/*"].csharp_plugin = False
self.options["grpc/*"].node_plugin = False
self.options["grpc/*"].objective_c_plugin = False
self.options["grpc/*"].php_plugin = False
self.options["grpc/*"].python_plugin = False
self.options["grpc/*"].ruby_plugin = False

Comment on lines +26 to +34

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Gate gRPC option overrides behind with_grpc to avoid global graph side-effects

Unconditionally overriding dependency options can leak into consumer graphs and fail builds even when gRPC is off. Guard these settings.

Apply this diff:

 def configure(self):
-        self.options["grpc/*"].codegen = False
-        self.options["grpc/*"].cpp_plugin = True
-        self.options["grpc/*"].csharp_ext = False
-        self.options["grpc/*"].php_plugin = False
-        self.options["grpc/*"].node_plugin = False
-        self.options["grpc/*"].otel_plugin = False
-        self.options["grpc/*"].ruby_plugin = False
-        self.options["grpc/*"].csharp_plugin = False
-        self.options["grpc/*"].python_plugin = False
-        self.options["grpc/*"].with_libsystemd = False
-        self.options["grpc/*"].objective_c_plugin = False
+        if not self.options.with_grpc:
+            return
+        self.options["grpc/*"].codegen = False
+        self.options["grpc/*"].cpp_plugin = True
+        self.options["grpc/*"].csharp_ext = False
+        self.options["grpc/*"].php_plugin = False
+        self.options["grpc/*"].node_plugin = False
+        self.options["grpc/*"].otel_plugin = False
+        self.options["grpc/*"].ruby_plugin = False
+        self.options["grpc/*"].csharp_plugin = False
+        self.options["grpc/*"].python_plugin = False
+        self.options["grpc/*"].with_libsystemd = False
+        self.options["grpc/*"].objective_c_plugin = False
📝 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
def configure(self):
self.options["grpc/*"].codegen = False
self.options["grpc/*"].cpp_plugin = True
self.options["grpc/*"].csharp_ext = False
self.options["grpc/*"].php_plugin = False
self.options["grpc/*"].node_plugin = False
self.options["grpc/*"].otel_plugin = False
self.options["grpc/*"].ruby_plugin = False
self.options["grpc/*"].csharp_plugin = False
self.options["grpc/*"].python_plugin = False
self.options["grpc/*"].with_libsystemd = False
self.options["grpc/*"].objective_c_plugin = False
def configure(self):
# Only override grpc/* options when gRPC support is explicitly enabled
if not self.options.with_grpc:
return
self.options["grpc/*"].codegen = False
self.options["grpc/*"].cpp_plugin = True
self.options["grpc/*"].csharp_ext = False
self.options["grpc/*"].php_plugin = False
self.options["grpc/*"].node_plugin = False
self.options["grpc/*"].otel_plugin = False
self.options["grpc/*"].ruby_plugin = False
self.options["grpc/*"].csharp_plugin = False
self.options["grpc/*"].python_plugin = False
self.options["grpc/*"].with_libsystemd = False
self.options["grpc/*"].objective_c_plugin = False
🤖 Prompt for AI Agents
In conanfile.py around lines 26 to 38, the code unconditionally overrides
options for "grpc/*" which can leak into consumer graphs; wrap those assignments
in a guard that only runs when the package's with_grpc option is enabled. Change
the block to check the package option (e.g. if getattr(self.options,
"with_grpc", False) or if self.options.get_safe("with_grpc")) and only then set
self.options["grpc/*"].codegen = False etc.; leave the assignments out when
with_grpc is False so they don't affect unrelated dependency graphs.

def requirements(self):
if self.options.with_tests:
self.requires("trompeloeil/48")
Expand All @@ -44,3 +53,12 @@ def requirements(self):

if self.options.with_cmake:
self.tool_requires("cmake/3.29.3")

def generate(self):
deps = CMakeDeps(self)
deps.generate()
tc = CMakeToolchain(self)

if self.settings.compiler == "clang":
tc.extra_cxxflags.extend(['-Wno-missing-template-arg-list-after-template-kw'])
tc.generate()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

⚠️ Potential issue

Fix NameError for CMakeDeps/CMakeToolchain and avoid double-generation

  • Missing imports cause NameError (Ruff F821). Add the import.
  • Since you manually generate CMakeDeps/Toolchain, drop the generators = "CMakeDeps", "CMakeToolchain" attribute to prevent duplicate files.
  • Use get_safe for the compiler check.

Apply within this hunk:

-        if self.settings.compiler == "clang":
+        if self.settings.get_safe("compiler") == "clang":
             tc.extra_cxxflags.extend(['-Wno-missing-template-arg-list-after-template-kw'])

And elsewhere in the file (outside this hunk):

# top-level imports
from conan.tools.cmake import CMakeDeps, CMakeToolchain

# remove the attribute to avoid double-generation
# generators = "CMakeDeps", "CMakeToolchain"
🧰 Tools
🪛 Ruff (0.12.2)

58-58: Undefined name CMakeDeps

(F821)


60-60: Undefined name CMakeToolchain

(F821)

🤖 Prompt for AI Agents
In conanfile.py around lines 57 to 64, the generate() function references
CMakeDeps and CMakeToolchain causing a NameError because they are not imported,
and the class still declares generators = "CMakeDeps", "CMakeToolchain" which
leads to double-generation; add top-level imports `from conan.tools.cmake import
CMakeDeps, CMakeToolchain`, remove the `generators = "CMakeDeps",
"CMakeToolchain"` attribute from the class, and change the compiler check to use
`self.settings.compiler.get_safe()` (e.g. `if self.settings.compiler.get_safe()
== "clang":`) while keeping the manual deps.generate() and tc.generate() calls.

Loading