Skip to content

Feature/removing ext submodules#5

Open
jglanz wants to merge 2 commits intomasterfrom
feature/removing-ext-submodules
Open

Feature/removing ext submodules#5
jglanz wants to merge 2 commits intomasterfrom
feature/removing-ext-submodules

Conversation

@jglanz
Copy link
Copy Markdown
Collaborator

@jglanz jglanz commented Sep 30, 2025

No description provided.

- removed `rapidjson`
- added vcpkg zlib
- added vcpkg gmp
- added vcpkg catch2
- added vcpkg prometheus-cpp
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the rapidjson Git submodule from the project and updates the build system to use rapidjson as an external package dependency instead. This change modernizes the dependency management approach by moving away from Git submodules to package-based dependencies.

  • Removed rapidjson Git submodule and its configuration
  • Updated CMakeLists.txt to find and link rapidjson as an external package
  • Commented out rapidjson submodule entry in .gitmodules instead of removing it completely

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
external/rapidjson Removes the rapidjson submodule directory
CMakeLists.txt Adds package finding logic and updates library linking for rapidjson
.gitmodules Comments out the rapidjson submodule configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +6 to +11
if (NOT TARGET rapidjson)
find_package(RapidJSON REQUIRED)
if(NOT TARGET rapidjson)
message(FATAL_ERROR "RapidJSON not found!")
endif()
endif()
Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

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

The logic is inconsistent: find_package(RapidJSON REQUIRED) should create a target, but the code checks for rapidjson (lowercase) while the package name is RapidJSON (camelcase). The target name created by find_package may be different. Consider using RapidJSON::RapidJSON or check the actual target name created by the RapidJSON CMake package.

Copilot uses AI. Check for mistakes.
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/external/rapidjson/include"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")

target_link_libraries(abieos rapidjson)
Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

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

The target name rapidjson may not exist. RapidJSON typically creates targets like RapidJSON::RapidJSON. Verify the correct target name from the RapidJSON package documentation or use rapidjson::rapidjson if that's the expected target.

Copilot uses AI. Check for mistakes.
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")

target_link_libraries(abieos_module ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(abieos_module ${CMAKE_THREAD_LIBS_INIT} rapidjson)
Copy link

Copilot AI Sep 30, 2025

Choose a reason for hiding this comment

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

Same issue as above - the target name rapidjson may not be correct. Should use the proper target name created by the RapidJSON package.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

@dtaghavi dtaghavi left a comment

Choose a reason for hiding this comment

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

Approved but if what CoPilot said is true we could adjust that. I imagine it doesn't matter since it worked for you in testing.

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.

4 participants