-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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 widget install and uninstall using hardlinks. #2312
Conversation
Wow, cool find. This is innovative, and I am enthusiastic about helping and testing. However, because it is innovative, we should expect to take it slow. File-hardlinks are perfectly ordinary; every experienced sysadmin uses them. Dir-hardlinks are exotic, people have been taught they don't exist. Some different rules apply. Therefore, to start with, I think they should be represented by two clearly different classes in Ruby. Do you mind if I PR to your personal branch? Also, @Peeja has been thinking about hardlinks in #2258. Perhaps he will join us here. |
I may be missing something, but I don't think Ruby's being fancy here. I think it's just handing down the |
@rolandwalker I don't mind. @Peeja I agree with you |
Hello good people! Thanks so much for the work you're putting in to solve this problem! 👔 I have to admit; the hardlinks sort of make me nervous. If widgets are always self contained should we consider just doing a Basically I'm talking about an Perhaps that will be simpler and more reliable? Though if others are convinced hardlinks are worth it I'm willing to be persuaded. 😀 |
Okay @rolandwalker has talked me into the merits of hardlinks (or file hardlinks at least) for solving problems like this. Provided dir-hardlinks are properly supported in OS X, and since this would be limited to a small subset of Casks, I'd be willing to give this a shot. What's the latest on this? @rolandwalker did you end up PR'ing that branch? |
I remain interested but have not pursued it yet. The fact that Ruby does dir-hardlinks without blinking is cool. Fonts using file-hardlinks has been working great. However, using dir-hardlinks in production requires plenty of due diligence:
But widgets really don't work with symlinks. I have even tried duplicating the directory-tree of a widget and symlinking in each piece of content. Even that does not work. So, please don't close! |
Just throwing this out there, after researching dir hard links. Considerations/potential pitfalls
I agree with the point earlier that we dealing with an exotic/esoteric feature Apple also crippled LN to take away the directory functionality. (probably for good reason). While it's certainly a super cool hack, how wise would it be, making it a mainstream option? Perhaps marking it 'experimental', would be more appropriate? |
@wamatt yes, and "experimental" option is the current plan. |
I guess this can be closed because of #2206 |
If it's not too inconvenient, I'd like to leave this open, because I still want to do something like $ brew cask --method=hardlink activate |
Widget support has been removed as of #8751. |
Fixes #2206
Related to ongoing discussion on #2264
Related to #2258 (merge conflicts?)
@rolandwalker This fixes the widget problem without showing a popup dialog to install.
File.link
seems to do the job of hard linking directories.