refactor: Remove direct components/core/src/clp include dependency and normalize CLP header includes; Simplify CLP core source path variable usage.#130
Conversation
WalkthroughIntroduces a new CMake variable Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
src/clp include dependency and normalize CLP header includes; Simplify CLP core source path variable usage.components/core/src/clp include dependency and normalize CLP header includes; Simplify CLP core source path variable usage.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@taskfiles/deps.yaml`:
- Around line 113-115: Add an inline comment above the URL entry that documents
why the CLP dependency points to the temporary fork (Bill-hbrhbr/clp at commit
bfae396), include the specific issue or PR in the upstream repo (y-scope/clp)
that tracks the fix (or a link/issue number), and state the condition for
reverting to the official repo (e.g., merge of that upstream PR or a specific
commit). Mention the commit hash bfae396 and that this is a temporary hot-fix to
make the intent and technical debt explicit for future maintainers.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 271bfa1b-4d45-49b6-a6f7-784ace813c1d
📒 Files selected for processing (2)
CMakeLists.txttaskfiles/deps.yaml
| FILE_SHA256: "8bb01253a37d4d53f0c1fd95dd58a386830968b93972edb64fc09d0310cb48d1" | ||
| OUTPUT_DIR: "{{.OUTPUT_DIR}}" | ||
| URL: "https://github.com/y-scope/clp/archive/de9fc08.tar.gz" | ||
| URL: "https://github.com/Bill-hbrhbr/clp/archive/bfae396.tar.gz" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify the fork commit exists and check its relationship to the main repo
echo "Checking if the commit exists in the fork..."
curl -s "https://api.github.com/repos/Bill-hbrhbr/clp/commits/bfae396" | jq '{sha: .sha, message: .commit.message, date: .commit.author.date}'
echo ""
echo "Checking for related PRs in y-scope/clp that might merge this fix..."
gh search prs --repo y-scope/clp --author Bill-hbrhbr --state open --json title,url,state --limit 5Repository: y-scope/clp-ffi-js
Length of output: 428
🏁 Script executed:
# Check the full context of the deps.yaml file around the CLP dependency
cat -n taskfiles/deps.yaml | head -130 | tail -30
# Look for any comments or notes about CLP in the repository
rg -i "bill-hbrhbr\|clp.*fork\|clp.*hot.?fix" --type yaml --type md --type txt --max-count 20
# Check git history for this file if available
git log --oneline -20 taskfiles/deps.yaml 2>/dev/null || echo "Git history not available"Repository: y-scope/clp-ffi-js
Length of output: 1326
🏁 Script executed:
# Search for any issues or discussions about the CLP string_utils problem
rg -i "clp::string_utils\|components/core/src/clp" --type-list
# Look for any GitHub issue references or TODO comments
rg -i "TODO|FIXME|BUG|issue" taskfiles/deps.yamlRepository: y-scope/clp-ffi-js
Length of output: 451
🏁 Script executed:
# Fix the search - look for any context about why the fork is needed
rg -i "string_utils|clp.*fork|components/core" --type yaml --type md
# Check if there's a PR or commit that explains this
git show 4241d90 --stat 2>/dev/null || echo "Cannot show full commit details"
# Look for any issue tracking or comments in related files
fd -e md -e txt -e yaml | xargs rg -l "clp|Bill-hbrhbr" 2>/dev/null || echo "No related files found"Repository: y-scope/clp-ffi-js
Length of output: 3252
🏁 Script executed:
# Check README or docs for any mentions of this CLP dependency issue
fd -i "readme|contributing|known.*issue" -t f | head -5 | xargs cat -n 2>/dev/null || echo "No docs found"
# Look for any CHANGELOG or NOTES about recent changes
fd -i "change|release|notes" -t f | head -5Repository: y-scope/clp-ffi-js
Length of output: 3322
🏁 Script executed:
# Look for any GitHub issue or PR references in the repo that might explain this
rg "github.com|issue|pull" taskfiles/deps.yaml
# Check if there's any documentation about dependencies or known issues
cat -n README.md | grep -A 10 -B 2 -i "depend\|known\|issue\|fork"
# Search for any comments about CLP in source files
rg -i "clp" src/ --type cpp --type hpp --max-count 10 -B 1 -A 1Repository: y-scope/clp-ffi-js
Length of output: 2593
Add documentation for temporary CLP fork and track upstream resolution.
The CLP dependency currently uses the personal fork Bill-hbrhbr/clp (commit bfae396) rather than the official y-scope/clp repository. While this appears intentional as a hot-fix branch, there is no in-code documentation explaining:
- Why the fork is necessary
- When it can be reverted to the official repository
Add an inline comment in taskfiles/deps.yaml documenting the specific issue that requires this fork and reference any upstream CLP PR or issue that tracks the fix. This will help future maintainers understand the technical debt and know when to revert.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@taskfiles/deps.yaml` around lines 113 - 115, Add an inline comment above the
URL entry that documents why the CLP dependency points to the temporary fork
(Bill-hbrhbr/clp at commit bfae396), include the specific issue or PR in the
upstream repo (y-scope/clp) that tracks the fix (or a link/issue number), and
state the condition for reverting to the official repo (e.g., merge of that
upstream PR or a specific commit). Mention the commit hash bfae396 and that this
is a temporary hot-fix to make the intent and technical debt explicit for future
maintainers.
There was a problem hiding this comment.
This is temporary and will be reverted later.
There was a problem hiding this comment.
@Bill-hbrhbr, understood! Since this is intentional and temporary, would you like me to open a follow-up GitHub issue to track reverting this back to the official y-scope/clp repository once the upstream fix is merged? That way it won't get lost.
🧠 Learnings used
Learnt from: junhaoliao
Repo: y-scope/clp-ffi-js PR: 35
File: src/clp_ffi_js/ir/StructuredIrStreamReader.cpp:50-51
Timestamp: 2024-11-14T15:31:45.926Z
Learning: Ensure that `clp-ffi-js` supports JavaScript usage without relying on the TypeScript definition file, and keep track of related TODOs in a GitHub issue.
Learnt from: Bill-hbrhbr
Repo: y-scope/clp-ffi-js PR: 125
File: taskfiles/tests.yaml:7-9
Timestamp: 2026-02-22T14:07:05.069Z
Learning: In taskfiles YAML configurations, do not add or rely on a separate status guard for Playwright installation tasks. Playwright install already performs checksum verification and skips redundant installs when browsers are already present, so a Taskfile status check is unnecessary. If you implement installation guards, prefer removing the guard for Playwright and rely on its built-in optimization to simplify the task and avoid redundant executions.
hoophalab
left a comment
There was a problem hiding this comment.
LGTM. I will test again after the deps.yaml is updated and conflicts are resolved.
| FILE_SHA256: "8bb01253a37d4d53f0c1fd95dd58a386830968b93972edb64fc09d0310cb48d1" | ||
| OUTPUT_DIR: "{{.OUTPUT_DIR}}" | ||
| URL: "https://github.com/y-scope/clp/archive/de9fc08.tar.gz" | ||
| URL: "https://github.com/Bill-hbrhbr/clp/archive/bfae396.tar.gz" |
|
let's resolve the conflicts once #141 is merged |
Description
This PR removes the dependency on the explicit
components/core/src/clpinclude directory inclp-ffi-js, which standardizes header usage with namespaced CLP includes. In particular, call sites that previously includedtype_utils.hppdirectly now includeclp/type_utils.hpp. The goal is to reduce and tightentarget_include_directoriessurface area.A related include-path leak also exists in the main CLP repo:
components/core/src/clpis exposed transitively viaclp::string_utilsCMakeLists.txt).Follow-up cleanup in both this PR and upstream CLP is currently blocked on moving
clp::string_utilsinto ystdlib-cpp.For further cleanup, the build now uses
CLP_FFI_JS_CLP_CORE_SRC_DIRin place ofCLP_FFI_JS_CLP_SOURCE_DIRECTORY/components/core/srcfor cleaner path construction.Checklist
breaking change.
Validation performed
Summary by CodeRabbit