el-get icon indicating copy to clipboard operation
el-get copied to clipboard

Wrong dependency resolution?

Open kissge opened this issue 8 years ago • 3 comments

A repository xcwen/ac-php contains ac-php (auto-complete backend for PHP) and company-php (company-mode backend for PHP), and since I use company-mode I tried to install company-php only.

I tried (el-get-bundle ac-php), (el-get-bundle xcwen/ac-php) and (el-get-bundle company-php in xcwen/ac-php), but any of these led to installing auto-complete, which is a dependency of ac-php, but not of company-php. I don't want packages that I don't use to be installed. How can I achieve that?

Any comments will be appreciated. Thanks!

kissge avatar Jul 08 '16 10:07 kissge

It sounds similar to the situation with the jedi recipe. The solution used there is to have a jedi-core.rcp which uses the same repo but without the dependency on auto-complete (see #2400). Perhaps you can fix the ac-php recipes to do the same?


Basically the problem is that el-get (and package.el) do not support optional dependencies. Adding support for this can cause major complexity though; the Debian package manager supports it and its dependency resolution is apparently NP-complete: https://people.debian.org/~dburrows/model.pdf

npostavs avatar Jul 09 '16 12:07 npostavs

Thanks for advice and for an interesting article. I finally made it:

(el-get-bundle company-php in xcwen/ac-php
  :name company-php ;; rename package so that el-get doesn't get confused
  :depends (s f xcscope yasnippet php-mode popup))

But I would say auto-complete should be removed from ac-php dependencies; any opinions?

kissge avatar Jul 10 '16 07:07 kissge

I think it's probably better to have a separate ac-php-core recipe as I mentioned above, but I won't insist (doesn't really affect me either way, since I don't use these packages...).

npostavs avatar Jul 15 '16 00:07 npostavs