-
-
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
Can we move apps instead of symlinking them? #3083
Comments
Also, usually apps receive self-updates before someone publishes it on Cask. Cask should check version numbers (because, again, OS X bundles contain this information) and make sure that it doesn't unintentionally downgrade. |
The biggest reason apps are symlinked right now instead of moved/copied as the default (that I can tell) is the ability to have multiple versions of an app installed. I don't think there's a "select" function (as in like |
Most apps have the version number 'latest' anyway — can we make this happen for at least those apps? |
This is done for ideological reasons, so it is unlikely to change. This is not to say you don’t make some good points, but you’re also missing a lot of others. Homebrew-cask has evolved beyond much more than what it started as, so this question might need to be revisited, but this is not a trivial change at all. The homebrew- part in the name means that a lot of functionality comes from homebrew itself (which makes technical reasons a consideration as well), and naturally some of the things that come attached to it make more sense than others. In addition, this project has an already considerable user base, so even though it’s not yet even at 1.0, a change like this needs thought (even considering just linking there is a strong divide between people who prefer linking to Many of the points you mention are or have been already discussed/resolved. Usually I’d try to find them and link to the appropriate discussions, but there are so many points here that it’d be more productive to point them out in a per-case basis for points you might wish to discuss further, as trying to address each of your concerns was leaving me with an (even more) unmanageable wall of text. However, I’d like to briefly address the point in your last comment.
From my quick check, this seems to be the case for less than (but close to) half, not most, and this may not always be the case, as we’re discussing changing that.
That is a bad idea, and you’ve already explained why in your first post.
Even though your point was made for a different case, it applies even stronger here, as you’re suggesting an arbitrary change in certain casks, that would be invisible and incomprehensible to most users, even more than your familiarity point (I don’t recall a single user being confused by seeing a symlink instead of an app; and would be surprised to see it from one that can use this project in its current form — CLI-only). Homebrew-cask does not change what happens with This approach has merits to it, as does your suggestion, but in some places your wording sounds more like what you wish homebrew-cask did, as opposed to what would be better for it to do. This is in no way a condemnation — this kind of project is born out of being unsatisfied about how things work, so it can definitely be a good thing. For a long time I even used a script to do what you ask, as I also disliked the linking approach. Having said that, there are a lot of good decisions here, and they always take the community into account, so I urge you to stick around, as new ideas are well received. |
Thanks for the response, it explains a lot of things. How feasible do you think would it be to have persistent install settings? These would include:
I feel like having the option to override the defaults is not a bad idea, since scripts can always specify them explicitly. To avoid scripts from hardcoding the default settings something like But based on what you said, I feel like a postinstall script that replaces linking can actually take are of this and wouldn't require Cask to change at all. Does Cask have any postinstall hooks or anything like that? Also, what is the current way to deal with Cask-versioned apps that are updated through non-Cask methods? |
Doesn't work properly with launchers. A command needed to be built just to accommodate Alfred. Quicksilver treats Cask-installed symlinks as files (Open With doesn't work), and I assume a fix would not be straightforward. One can add the Caskroom directory to the search paths for Alfred (and I suspect Quicksilver) instead of ~/Application to make the apps runnable again. I realise this isn't directly related to resolving the issue, but it was the first problem I encountered with Cask and I suspect it'll be a pain-point for many adopters. |
Thanks Govan. I realize this is adequate workaround for some people, but I have a few problems with this. In short, this doesn't work because One minor problem is that Quicksilver displays paths to things, and
The bigger problem is that I need
This means I have to include both paths in app launchers, so I'm left with this: My point here is the Cask makes too many assumptions about your setup and you're forced to choose between two extremes — either manage all your apps with Cask or face a barrage of duplicates. In fact, the more apps you do manage with Cask, the more duplicates you'll have! If this were an inherent problem with OS X or Homebrew, I'd stop talking now. But I believe that this can be easily fixed with a Cask external command that will move installed apps outside the Caskroom (while still keeping track of them!). This is something I plan to make soon, and the only thing it might depend on is requiring app IDs in Cask formulae. |
As aforementioned, adding the Caskroom path to Alfred, in particular, is pretty easy:
(and with the latest Homebrew-Cask update, it's actually working now). I think the problem you mentioned regarding duplicates plagues Homebrew and MacPorts as well. Homebrew encourages you to deal with it by putting Taking a look at Homebrew-Cask's approach, there's no good way to swap symlinks that I can think of (unless you rename/make backups of existing symlinks and then rename/move them back during uninstallation). If you try to use MacPorts' method, you could let the user switch which app to use (with some Also, there are Casks available for Xee and YouView at this point; I'm working on one for Spark. |
Homebrew and other command line tool symlinks don't bother me as much, since symlinking is standard practice. It's not standard for OS X apps to be symlinked, and simply because of that, using symlinks is bound to break things. In addition (and probably partially why it's nonstandard), it would be hard for app launchers and other tools that must keep an index to keep track of symlinks, especially when the referent changes (i.e., when Cask upgrades an app). And I haven't |
I don’t really feel saying “not every app I install is mainstream enough to be included in Cask” is a fair criticism. If there’s an app you want in homebrew-cask and it’s not here still, even if you do not want to add it yourself, opening a simple issue with a request will suffice. I’ve added (and seen other contributors submit) requested casks mere minutes after they’ve been asked for. Regarding moving apps from the Caskroom to your Applications directory, it should be simple enough to do externally, and as I’ve pointed out on my previous comment. It has been done (maybe it does not work anymore, since it’s no longer maintained, but it worked well when I relied on it). On another note, I hadn’t noticed that xee version is paid (and perhaps @alebcay hadn’t as well). I made the specific request for that version, as he had originally submitted the one you’re asking for. However, seeing as it is an older version, it should be included in caskroom versions. I likely overlooked something here — why exactly are you having duplicates? Homebrew-cask does not force you to manage any of your apps with it, it stays out of the way of apps installed manually. As stated, it does not move your apps to Again, you make good points but in some of your arguments it seems like you’re talking about what you wish homebrew-cask did, as opposed to what would be better for it to do. I urge you to not only try to push this change, but to expose the problems you encounter as project issues (as in github issues, like this one). You’re offering up your specific problems and one solution that you feel is the best; maybe it is not. If, however, you open new issues with those problems, you’ll have a number of eyes and minds on that problem that will try to solve it, which will in turn make the project better and solve your troubles, even if not applying your proposed solution. Again, please realise there’s a reason for it to work the way it does. Will your solution solve some of the existing problems? Yes. Will it also cause new ones? Yes. This is not a simple change that can be made in a few lines and solve everything. It has to be considered and evaluated. You’ve exposed the troubles you’ve encountered, and proposed a solution. Believe that it is appreciated. This issue, however, is focused on that proposed method, instead of the problems. The next step is for you to open new issues in the appropriate place so we can look at them individually and solve them for you and every other user. |
I've made a pull request in |
Regarding apps that can't be on Cask, I see now that obscure apps can be on Cask too, and I'm impressed by the speed of the submission process. I'll stop talking about Xee and Spark and friends in this issue. However, I stand by my point that apps with custom modifications and non-free licenses cannot be Cask-managed. This means that my When I talked about duplicates, I meant that Quicksilver will show two instances of the same app. I cannot remove the Caskroom one because it is the fully functional one, and I cannot remove the Thanks for suggesting that I should probably raise issues about problems rather than proposed enhancements. (I only mentioned possible solutions because I'm used to thinking that complaining about issues without offering fixes is not a good way to do things, but I forget that this works differently.) The next time you'll hear from me about an enhancement for these problems will probably be when I actually make it. Thanks to the discussion above, it looks like these are the only relevant problems. Thanks for helping me narrow this down.
Finally, thanks for your extended replies, and for finding links to the issues I mentioned. It's much appreciated. |
I might be overlooking something again (there’s already so much text in this issue, that we’re bound to lose track of some things). Why do you say apps with non-free licenses cannot be “Cask-managed”? We have a bunch of commercial apps in the project. As long as you can insert a license on the version downloaded via homebrew-cask to make it full, it’s accepted. Furthermore, how would moving apps directly to The duplication problem is a quicksilver issue, then, that’s an important detail. There’s no reason we shouldn’t look into it and try to tackle that as well, to provide a better experience. This is an example of a case where opening an issue would be much more beneficial than discussing it in this one. By doing that, you’re also getting the input of other users that might have insights into the problem. I’ve never suggested you should “raise issues about problems rather than proposed enhancements”. My sentence is even bolded on my comment, where I clearly say “not only”, as in “you should do this in addition to”. The place where issues are raised is at the same time the place for proposing solutions. The point I’m trying to get across to you is that your solution is not an immediately viable option. You do not need to impose a fix, and you do not need to make one. What is asked of you is that you offer these issues for discussion appropriately. This is not a forum — problems are localised and discussions are contained, so we can address each case optimally. Look at the title of this issue — it’s a request/suggestion — contributors that do not care/do not have an opinion on it will likely not read through everything (or at all). Compare that to an issue titled “symlinking apps causes quicksilver to show duplicates”, where you expose not only the problem, but any other related detail — users that have gone through it (if there are any) will immediately be able to help, as will any number of other contributors that may have an insight on the problem. By insisting on a solution that is not (at least currently) in line with the goals of the project, you are not solving your problem. By detailing your issues appropriately, you are (and not just for yourself). Maintain this issue, and let us discuss it, but at the same time expose each of the problems you encounter as separate issues, so we can solve them as well, even if by a different solution that is more in line with the project’s goals. I’ve always tried to be cordial with you throughout this whole issue, while evaluating your points and explaining what works and doesn’t in tandem with the goals and philosophy for this project. If at any point you feel I’ve been unjust in any of my assessments, please feel free to be blunt about it. |
We have a lot of text in this issue now, so it’s becoming a bit unlikely that new eyes will go through all of it to see the discussion. There’s a new issue where someone is offering to build this as an addition, so lets move the conversation there to see how we can actually do it, and get back to this if needed. Thank you for all the input. |
That sounds like a good idea; thanks for linking to the new issue. |
Symlinking apps doesn't seem to be a good way to install "draggable" apps, and installing apps directly in the destination is probably a better idea.
Here are some issues with using symlinks:
AppName (versionnumber).app
.)Here are some (additional) reasons why directly installing is a better idea:
.pkg
installers install their stuff.However, symlinking is a good solution for pretty much everything that isn't an bundle — this is why Homebrew works so well — and for apps like Eclipse and Audacity that require their data to be outside the bundle but the same containing folder.
The gist of all this is that Mac Apps were made to be manipulated directly by the user, and Cask does not work well with this. Cask should instead augment the Mac app management experience, instead of restricting it.
The text was updated successfully, but these errors were encountered: