Skip to content

fix: resolve normalized path on Windows even for symlinks: false#1036

Merged
Boshen merged 1 commit intomainfrom
02-27-fix_resolve_normalized_path_on_windows_even_for_symlinks_false_
Feb 28, 2026
Merged

fix: resolve normalized path on Windows even for symlinks: false#1036
Boshen merged 1 commit intomainfrom
02-27-fix_resolve_normalized_path_on_windows_even_for_symlinks_false_

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Feb 27, 2026

This PR fixes the failing test in rolldown/rolldown#8483.

slightly related #345

Copy link
Member Author


How to use the Graphite Merge Queue

Add the label merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.78%. Comparing base (a6163d0) to head (11349bd).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1036   +/-   ##
=======================================
  Coverage   91.78%   91.78%           
=======================================
  Files          20       20           
  Lines        3980     3980           
=======================================
  Hits         3653     3653           
  Misses        327      327           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sapphi-red sapphi-red marked this pull request as ready for review February 27, 2026 04:06
Copy link

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 fixes a Windows-specific path normalization issue where absolute paths with forward slashes were not being converted to backslashes when symlinks: false is configured. Previously, the path normalization only happened through the canonicalize function when symlinks: true, but paths with forward slashes would be returned as-is when symlinks were disabled.

Changes:

  • Added Windows-specific path normalization logic in load_realpath to convert forward slashes to backslashes even when symlinks: false
  • Added a test case to verify that both resolver configurations (with and without symlinks) properly normalize Windows paths

Reviewed changes

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

File Description
src/lib.rs Added conditional Windows path normalization in load_realpath using components().collect() when forward slashes are detected
src/tests/windows.rs Added test forward_slash_path_resolved_to_backslash to verify path normalization works for both symlinks: true and symlinks: false

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 27, 2026

Merging this PR will not alter performance

✅ 13 untouched benchmarks
⏩ 5 skipped benchmarks1


Comparing 02-27-fix_resolve_normalized_path_on_windows_even_for_symlinks_false_ (11349bd) with main (a6163d0)

Open in CodSpeed

Footnotes

  1. 5 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Boshen Boshen merged commit 6bc0a2d into main Feb 28, 2026
21 checks passed
@Boshen Boshen deleted the 02-27-fix_resolve_normalized_path_on_windows_even_for_symlinks_false_ branch February 28, 2026 02:12
@Boshen Boshen mentioned this pull request Feb 28, 2026
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.

3 participants