babariviere / guix-emacs

[UNMAINTAINED] Guix channel for automatically generated emacs packages.
GNU General Public License v3.0
28 stars 4 forks source link

Conflicts #2

Closed mekeor closed 2 years ago

mekeor commented 2 years ago

I constantly get these sort of conflicts:

$ guix package -i emacs-multi-vterm emacs-vterm   
guix package: warning: ambiguous package specification `emacs-vterm'
guix package: warning: choosing emacs-vterm@20220429.21 from emacs/packages/melpa.scm:81:2
The following package will be upgraded:
   emacs-vterm (dependencies or package changed)

The following package will be installed:
   emacs-multi-vterm 20210727.1050

guix package: error: profile contains conflicting entries for emacs-vterm
guix package: error:   first entry: emacs-vterm@20220429.21 /gnu/store/gx595jwfg0wi9kj44jk7hi6vpclwap87-emacs-vterm-20220429.21
guix package: error:   second entry: emacs-vterm@20220429.21 /gnu/store/g06r32nmga41104bb4ci2szijrysibp1-emacs-vterm-20220429.21
guix package: error:    ... propagated from emacs-multi-vterm@20210727.1050
hint: Try upgrading both `emacs-vterm' and `emacs-multi-vterm', or remove one of them from the profile.

Any idea why? :)

babariviere commented 2 years ago

Hello,

Yes, it's because the Guix channel already has this package. So, since they are both in the Guix channel and my channel, it will have a conflict.

For the fix, I can change the package name to emacs-melpa-package-name but it's a bit long. I don't have any other solution in mind for now.

babariviere commented 2 years ago

I have a looked a bit more into this error. It come from the fact that I override emacs-vterm. I will need to rework a bit my override system to make this work correctly. Sorry for the inconvenience

mekeor commented 2 years ago

@babariviere, i think this is because this line: https://github.com/babariviere/guix-emacs/blob/66866eb847151eef676d18c209cd47dcaa07d76a/emacs/packages/melpa.scm#L118 i.e. because the emacs-vterm package from (emacs packages melpa) depends on emacs-vterm from default guix-channel. why is it even necessary to use it as native-input?

babariviere commented 2 years ago

@mekeor That’s not the issue since I am getting native-inputs from gnu packages (so, it’s not a dependency). It’s required to be able to compile emacs-vterm native code.

The issue is that I have 2 declarations of emacs-vterm, one in melpa.scm and another one in melpa-generated.scm. Every packages depends on the one in melpa-generated.scm but you are installing the one from melpa.scm.

I will implement a fix in 1 or 2 week.

babariviere commented 2 years ago

This should be fixed with the latest commit cb51684b1a4fa0402c284942651ac192ac951d4b. Tell me if it works!

Kabouik commented 1 year ago

I came across a similar issue with emacs-ement which conflicts with emacs-magit, but then if I try uninstalling emacs-magit, another conflict emerges with emacs-help-bibtex and this is probably going to be a rather long series before all conflicts are gone (and I did not iterate much because uninstalling/installing packages is too long with Guix).

What is the best way to work around this issue? Should I just give up and install ement.el from list-packages within emacs?

babariviere commented 1 year ago

I am sorry for that, this is because dependencies doesn't use the package you have specified.

One way I have fixed this with my config is to rewrite emacs-packages to use either the latest version from this repo or use the version from guix.

You can find my snippet here: https://github.com/babariviere/dotfiles/blob/guix/baba/home/services/emacs.scm#L27

In your case, you can rewrite emacs-magit to use one of the two available packages.