-
Notifications
You must be signed in to change notification settings - Fork 74
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
refactor(core): Remove clp::Array
legacy code and migrate to use ystdlib::containers::Array
.
#712
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis pull request refactors the project’s array handling by replacing the local Changes
Tip ⚡💬 Agentic Chat (Pro Plan, General Availability)
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (18)
💤 Files with no reviewable changes (1)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (13)
🧰 Additional context used📓 Path-based instructions (1)`**/*.{cpp,hpp,java,js,jsx,tpp,ts,tsx}`: - Prefer `false == ` rather than `!`.
🔇 Additional comments (4)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
components/core/tests/test-Array.cpp (1)
13-13
: Update test case tags to reflect new namespace.The test case tags still reference "clp::Array" but should be updated to "ystdlib::Array" to match the new namespace.
-TEST_CASE("array_fundamental", "[clp::Array]") { +TEST_CASE("array_fundamental", "[ystdlib::Array]") { -TEST_CASE("array_default_initializable", "[clp::Array]") { +TEST_CASE("array_default_initializable", "[ystdlib::Array]") {Also applies to: 45-45
.gitmodules (1)
32-34
: Submodule Addition: New ystdlib-cpp Reference
The new submodule entry forystdlib-cpp
is correctly added, providing the necessary URL and path for the library. This aligns well with the overall objective of refactoring the Array functionality to be sourced from an external module.It might be worth considering pinning a specific commit or tag for stability in future builds.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (18)
.gitmodules
(1 hunks)components/core/CMakeLists.txt
(2 hunks)components/core/src/clp/Array.hpp
(0 hunks)components/core/src/clp/NetworkReader.hpp
(2 hunks)components/core/src/clp/clg/CMakeLists.txt
(1 hunks)components/core/src/clp/clo/CMakeLists.txt
(1 hunks)components/core/src/clp/clp/CMakeLists.txt
(1 hunks)components/core/src/clp/make_dictionaries_readable/CMakeLists.txt
(1 hunks)components/core/src/clp/streaming_compression/lzma/Compressor.hpp
(2 hunks)components/core/src/clp/streaming_compression/zstd/Compressor.hpp
(2 hunks)components/core/src/clp/streaming_compression/zstd/Decompressor.hpp
(2 hunks)components/core/src/clp_s/CMakeLists.txt
(1 hunks)components/core/src/clp_s/indexer/CMakeLists.txt
(1 hunks)components/core/submodules/ystdlib-cpp
(1 hunks)components/core/tests/test-Array.cpp
(1 hunks)components/core/tests/test-FileDescriptorReader.cpp
(2 hunks)components/core/tests/test-NetworkReader.cpp
(2 hunks)components/core/tests/test-StreamingCompression.cpp
(2 hunks)
💤 Files with no reviewable changes (1)
- components/core/src/clp/Array.hpp
✅ Files skipped from review due to trivial changes (1)
- components/core/submodules/ystdlib-cpp
🧰 Additional context used
📓 Path-based instructions (8)
components/core/tests/test-FileDescriptorReader.cpp (1)
Pattern **/*.{cpp,hpp,java,js,jsx,ts,tsx}
: - Prefer false == <expression>
rather than !<expression>
.
components/core/src/clp/NetworkReader.hpp (1)
Pattern **/*.{cpp,hpp,java,js,jsx,ts,tsx}
: - Prefer false == <expression>
rather than !<expression>
.
components/core/tests/test-StreamingCompression.cpp (1)
Pattern **/*.{cpp,hpp,java,js,jsx,ts,tsx}
: - Prefer false == <expression>
rather than !<expression>
.
components/core/tests/test-NetworkReader.cpp (1)
Pattern **/*.{cpp,hpp,java,js,jsx,ts,tsx}
: - Prefer false == <expression>
rather than !<expression>
.
components/core/tests/test-Array.cpp (1)
Pattern **/*.{cpp,hpp,java,js,jsx,ts,tsx}
: - Prefer false == <expression>
rather than !<expression>
.
components/core/src/clp/streaming_compression/zstd/Decompressor.hpp (1)
Pattern **/*.{cpp,hpp,java,js,jsx,ts,tsx}
: - Prefer false == <expression>
rather than !<expression>
.
components/core/src/clp/streaming_compression/lzma/Compressor.hpp (1)
Pattern **/*.{cpp,hpp,java,js,jsx,ts,tsx}
: - Prefer false == <expression>
rather than !<expression>
.
components/core/src/clp/streaming_compression/zstd/Compressor.hpp (1)
Pattern **/*.{cpp,hpp,java,js,jsx,ts,tsx}
: - Prefer false == <expression>
rather than !<expression>
.
⏰ Context from checks skipped due to timeout of 90000ms (12)
- GitHub Check: centos-stream-9-static-linked-bins
- GitHub Check: ubuntu-focal-static-linked-bins
- GitHub Check: centos-stream-9-dynamic-linked-bins
- GitHub Check: ubuntu-jammy-static-linked-bins
- GitHub Check: ubuntu-focal-dynamic-linked-bins
- GitHub Check: ubuntu-jammy-dynamic-linked-bins
- GitHub Check: build-macos (macos-14, false)
- GitHub Check: lint-check (ubuntu-latest)
- GitHub Check: build-macos (macos-13, false)
- GitHub Check: build (macos-latest)
- GitHub Check: lint-check (macos-latest)
- GitHub Check: build-macos (macos-13, true)
🔇 Additional comments (16)
components/core/tests/test-Array.cpp (1)
5-5
: LGTM! Clean namespace transition.The include and using directive changes correctly reflect the move to ystdlib.
Also applies to: 10-10
components/core/tests/test-FileDescriptorReader.cpp (1)
6-6
: LGTM! Clean integration of ystdlib::Array.The changes correctly update the buffer type while maintaining the existing functionality.
Also applies to: 42-42
components/core/src/clp/streaming_compression/zstd/Compressor.hpp (1)
5-5
: LGTM! Clean transition to ystdlib::Array.The changes correctly update the buffer type while maintaining the ZSTD-specific buffer sizing.
Also applies to: 101-101
components/core/src/clp/streaming_compression/zstd/Decompressor.hpp (1)
7-7
: LGTM! Clean transition to ystdlib::Array.The changes correctly update both the optional and direct Array member variables.
Also applies to: 134-134, 141-141
components/core/tests/test-StreamingCompression.cpp (1)
9-9
: LGTM! The changes align with the PR objective.The header inclusion and usage of
ystdlib::Array
type are consistent with the migration from CLP to ystdlib-cpp.Also applies to: 32-32
components/core/src/clp/streaming_compression/lzma/Compressor.hpp (1)
6-6
: LGTM! The changes align with the PR objective.The header inclusion and usage of
ystdlib::Array
type for the buffer are consistent with the migration from CLP to ystdlib-cpp.Also applies to: 227-227
components/core/tests/test-NetworkReader.cpp (1)
11-11
: LGTM! The changes align with the PR objective.The header inclusion and usage of
ystdlib::Array
type for the read buffer are consistent with the migration from CLP to ystdlib-cpp.Also applies to: 72-72
components/core/src/clp/NetworkReader.hpp (1)
19-19
: LGTM! The changes align with the PR objective.The header inclusion and usage of
ystdlib::Array
type for the buffer pool are consistent with the migration from CLP to ystdlib-cpp.Also applies to: 347-347
components/core/src/clp/make_dictionaries_readable/CMakeLists.txt (1)
52-52
: Dependency Addition: Linking ystdlib::array
The addition ofystdlib::array
to thetarget_link_libraries
section is appropriate and reflects the shift from the legacy Array implementation to the new library. The linkage order appears consistent with project practices.components/core/src/clp_s/indexer/CMakeLists.txt (1)
95-95
: Linking Update: Inclusion of ystdlib::array
Addingystdlib::array
in the indexer’s CMake configuration ensures that this target will now use the new Array implementation. This change is coherent with the broader refactoring effort.Please verify that the dependency order here does not conflict with other libraries.
components/core/src/clp/clg/CMakeLists.txt (1)
142-142
: Library Linkage: ystdlib::array Added to clg
The inclusion ofystdlib::array
in theclg
executable’s linking settings is consistent with the refactor. It ensures that all components now rely on the unified Array implementation provided by the external library.components/core/src/clp/clo/CMakeLists.txt (1)
170-170
: Consistent Refactoring: ystdlib::array for clo Executable
Integratingystdlib::array
into theclo
target continues the consistent application of the new Array library across the project components. The modification is straightforward and adheres to the broader modularisation goals.components/core/src/clp/clp/CMakeLists.txt (1)
184-184
: Dependency Addition: Linking ystdlib::arrayThe inclusion of
ystdlib::array
in thetarget_link_libraries
block correctly reflects the ongoing migration to the new array library. Please ensure that all components interfacing with array functionality have been updated to work with the new module.components/core/src/clp_s/CMakeLists.txt (1)
265-265
: Library Linkage Consistency: Adding ystdlib::arrayAdding
ystdlib::array
to theclp-s
target ensures that the new library’s functionality is available where needed. Confirm that all source files depending on array features are updated accordingly to interface withystdlib::Array
.components/core/CMakeLists.txt (2)
250-252
: Subdirectory Inclusion: Integrating ystdlib-cppThe new subdirectory for
ystdlib-cpp
has been added withEXCLUDE_FROM_ALL
, which is appropriate if you do not require building it by default. Ensure that this configuration aligns with your overall build strategy and that documentation is updated to reflect this integration.
640-642
: UnitTest Target Update: Linking ystdlib::arrayAppending
ystdlib::array
to the unitTest target’s linking list supports the migration from the custom array implementation. Verify that all unit tests relying on array functionality have been updated to use the new interface provided byystdlib::Array
.
clp::Array
usages with ystdlib::containers::Array
.
clp::Array
usages with ystdlib::containers::Array
.clp::Array
legacy code and migrate to use ystdlib::containers::Array
.
Description
As title.
This PR also cleans up the header includes for
clp::Array
. It was previously a standalone file incore-clp
, included via fragile relative paths, and used by projects outside ofcore-clp
, leading to a convoluted structure.It is now correctly included as a library class from
ystdlib::containers
, with unit tests relocated toystdlib-cpp
. For nuanced changes to the originalArray
class, see the migration PR inystdlib-cpp
.Checklist
Validation performed
clp::Array
pass their unit tests after the change.Summary by CodeRabbit