Repository navigation
Conversation
|
GNU testsuite comparison: |
38a95a3 to
82ff922
Compare
| /// | ||
| /// * `bool` - Returns `true` if the paths are hard links to the same file, and `false` otherwise. | ||
| #[cfg(unix)] | ||
| pub fn are_hardlinks_to_same_file(source: &Path, target: &Path) -> bool { |
There was a problem hiding this comment.
the unit tests below are still #[cfg(unix)], please enable them on windows too since the function now works there
| /// | ||
| /// * `bool` - Returns `true` if either of above conditions are true, and `false` otherwise. | ||
| #[cfg(unix)] | ||
| pub fn are_hardlinks_or_one_way_symlink_to_same_file(source: &Path, target: &Path) -> bool { |
There was a problem hiding this comment.
on windows from_path actually opens the file, so a file we can't open now silently compares as "not the same" - is that ok for cp/mv?
| @@ -790,23 +784,17 @@ pub fn are_hardlinks_to_same_file(_source: &Path, _target: &Path) -> bool { | |||
| /// # Returns | |||
There was a problem hiding this comment.
CI is red (tests unix), could you please check it's not coming from this change? thanks
82ff922 to
2f7dc47
Compare
2f7dc47 to
9df2922
Compare
9df2922 to
09c01f9
Compare
Merging this PR will regress 2 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | factor_five_38_bit_primes |
1.8 s | 2.2 s | -18.26% |
| ❌ | Simulation | factor_thirteen_39_bit_primes |
8.7 s | 9 s | -3.76% |
| ⚡ | Simulation | factor_three_39_bit_primes |
800.7 ms | 590.7 ms | +35.54% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing wtcpython:fs-unify-hardlink (47f49f3) with main (2fb77e8)2
Footnotes
-
70 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. ↩
-
No successful run was found on
main(0982bd1) during the generation of this report, so 2fb77e8 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
09c01f9 to
46a78a1
Compare
| } | ||
|
|
||
| #[cfg(unix)] | ||
| #[cfg(not(target_os = "wasi"))] |
There was a problem hiding this comment.
This gate was widened to include Windows, but it uses Unix-only imports that aren't in scope here. Its body calls tempdir() and unix::fs::symlink(...), but both use std::os::unix; and use tempfile::tempdir; in the test module remain gated behind #[cfg(unix)] only (unchanged by this PR).
Reproduced with cargo check -p uucore --tests --target x86_64-pc-windows-gnu --no-default-features --features fs:
error[E0433]: cannot find module or crate
unixin this scope
--> src/uucore/src/lib/features/fs.rs:1400:9
error[E0425]: cannot find functiontempdirin this scope
--> src/uucore/src/lib/features/fs.rs:1396:24
There was a problem hiding this comment.
Created this #15301 to ensure uucore is checked on Windows.
46a78a1 to
b06218d
Compare
b06218d to
7506795
Compare
7506795 to
47f49f3
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Hard-link detection currently has separate Unix logic and always returns false on other platforms.
This reuses FileInformation for both hard-link checks, preserving the existing Unix behavior and enabling the same checks on Windows and WASI.