-
Notifications
You must be signed in to change notification settings - Fork 80
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
On non-Unix platforms, use deep copying rather than symlinking #1136
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1136 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 71 71
Lines 11967 11967
=========================================
Hits 11967 11967 ☔ View full report in Codecov by Sentry. |
@jnbooth thank you for working on this. Unfortunately the At the moment, I see two ways to fix this:
While option 1 is faster, option 2 is simpler, so option 2 is probably the better way forward at the moment. There's also the option to remove the check entirely, but I'm a bit hesitant to do that, as accessing the wrong headers from a duplicate dependency sounds like a really bad time and super hard to detect without this check... |
Ah, and side-note: The note from the README can be removed with this patch :) |
@LeonMatthesKDAB Thank you for taking a look at this so quickly! I'm taking most of today off for Thanksgiving, but I'll get to work on implementing those changes tomorrow. |
@LeonMatthesKDAB Ready for re-review. Here's how I handled the diffing: cxx-qt/crates/cxx-qt-build/src/dir.rs Lines 138 to 154 in 331829f
I think that should be fairly efficient. Using 2*1024 bytes of buffer seems safe enough. I noticed that in std, the default buffer size for BufReader is normally 8*1024 but set to only 512 for "bare metal" platforms, but I think those probably aren't relevant to cxx-qt. |
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.
@jnbooth Thank you for keeping on top of this.
I'm quite happy with how the PR is turning out.
There's some small things left, especially the files_conflict
function feels a bit more C-like than I would want.
Once those are resolved I'm happy to approve this :)
@jnbooth sorry for the delay, took me a bit longer than I hoped to re-review this patch. Unfortunately I also have to correct this statement:
Indeed I did not recall correctly, because while depending on CXX-Qt now no longer requires symbolic links, the repository still contains some. |
This reverts commit f0f2457.
@LeonMatthesKDAB Is there anything else I should do for this PR? |
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.
@jnbooth Again, sorry for the delay. The holidays had me firmly in their grasp 🎅
Thank you for the contribution.
Addresses #1120. cxx-qt-build's current symlinking works on Unix, fails on Windows unless Developer Mode is enabled, and panics on anything else. This PR modifies the non-Unix behavior to use deep file copying rather than symlinking.
I have tested this on Windows 11 and MacOS Sequoia 15.1.1.
Note: I'm not sure if this PR means these lines should be removed:
cxx-qt/README.md
Lines 87 to 93 in f5afefe