Skip to content

fix: normalize framework library cache paths - #1183

Merged
zackees merged 1 commit into
mainfrom
fix/dylint-framework-library-cache
Jul 25, 2026
Merged

fix: normalize framework library cache paths#1183
zackees merged 1 commit into
mainfrom
fix/dylint-framework-library-cache

Conversation

@zackees

@zackees zackees commented Jul 25, 2026

Copy link
Copy Markdown
Member

Summary

  • store framework-library cache paths as NormalizedPath
  • use normalized slash display when hashing relative paths

Fixes the remaining Dylint violations reported after #1182.

Validation

  • soldr cargo test -p fbuild-build-esp framework_library_cache
  • soldr cargo check -p fbuild-build-esp

Summary by CodeRabbit

  • Bug Fixes
    • Improved framework library cache consistency across operating systems by normalizing filesystem paths when generating cache keys.
    • Fixed cache invalidation behavior for equivalent paths with different separators or representations.
    • Preserved cache hydration and failure-marker persistence behavior.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@zackees, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 56 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 771dd074-8ee0-44de-8e27-68aff198e25a

📥 Commits

Reviewing files that changed from the base of the PR and between b9d4d9a and 5be675a.

📒 Files selected for processing (1)
  • crates/fbuild-build-esp/src/esp32/orchestrator/framework_library_cache.rs
📝 Walkthrough

Walkthrough

FrameworkLibraryCache now uses NormalizedPath for cache roots, failure paths, and directory hashing. Cache-key generation hashes slash-normalized relative paths instead of platform-specific PathBuf string representations.

Changes

Framework cache path normalization

Layer / File(s) Summary
Normalize cache path storage
crates/fbuild-build-esp/src/esp32/orchestrator/framework_library_cache.rs
FrameworkLibraryCache stores a NormalizedPath; constructors and failure-marker paths now create normalized values.
Normalize hashed relative paths
crates/fbuild-build-esp/src/esp32/orchestrator/framework_library_cache.rs
hash_tree walks normalized paths and hashes relative paths through display_slash().

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: normalizing framework library cache paths.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dylint-framework-library-cache

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/fbuild-build-esp/src/esp32/orchestrator/framework_library_cache.rs`:
- Around line 155-156: Update the path hashing logic around NormalizedPath and
strip_prefix to normalize root once, then strip paths against
normalized_root.as_path() instead of the unnormalized root. First add a
regression test using a real tempfile directory and a root containing a segment
such as framework/../framework, verifying equivalent roots produce the same
cache key; then implement the normalization fix.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 45598ccc-b118-4d1a-b22b-260a56c96894

📥 Commits

Reviewing files that changed from the base of the PR and between 51eace2 and b9d4d9a.

📒 Files selected for processing (1)
  • crates/fbuild-build-esp/src/esp32/orchestrator/framework_library_cache.rs

@zackees
zackees force-pushed the fix/dylint-framework-library-cache branch from b9d4d9a to 5be675a Compare July 25, 2026 04:12
@zackees
zackees merged commit 20ba6d5 into main Jul 25, 2026
21 of 22 checks passed
@zackees
zackees deleted the fix/dylint-framework-library-cache branch July 25, 2026 04:13
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant