-
Notifications
You must be signed in to change notification settings - Fork 85
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
fix: normalize Windows paths in Compiler output path handling #1745
Conversation
概述演练这个拉取请求修改了 变更
可能相关的 PR
诗歌
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (13)
🔇 Additional comments (2)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 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 (
|
WalkthroughThis pull request addresses the normalization of Windows paths in the Compiler's output path handling. The change involves using a utility function to ensure paths are correctly formatted for Windows environments. Changes
|
@@ -216,7 +217,7 @@ impl Compiler { | |||
let abs_path = &self.context.root; | |||
let output_path = &self.context.config.output.path; | |||
let dist_path = diff_paths(output_path, abs_path).unwrap_or_else(|| output_path.clone()); | |||
let mut path_str = dist_path.to_str().unwrap().to_string(); | |||
let mut path_str = win_path(dist_path.to_str().unwrap()); |
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.
Ensure that the win_path
function handles all edge cases for path normalization, such as trailing slashes or backslashes, to prevent potential path-related errors.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1745 +/- ##
==========================================
- Coverage 54.81% 54.81% -0.01%
==========================================
Files 180 180
Lines 18081 18081
==========================================
- Hits 9912 9911 -1
- Misses 8169 8170 +1 ☔ View full report in Codecov by Sentry. |
as pictures below.
Summary by CodeRabbit
新功能
Bug 修复