Skip to content
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

emacs: give melpa and melpa-stable own scope #36345

Closed
wants to merge 1 commit into from

Conversation

matthewbauer
Copy link
Member

@matthewbauer matthewbauer commented Mar 5, 2018

Melpa and Melpa Stable interfere with each other. Before this, Melpa
unstable will pull in dependencies from MelpaStable (even when Melpa
has the dependency). This moves melpa unstable and stable into their
own scopes to keep them separate.

Shouldn't break anything, but interested in feedback if it does.

/cc @mdorman @ttuegel @oxij

Also fixes nix-community/emacs2nix#43 and part of #11503.

Melpa and Melpa Stable interfere with each other. Before this, Melpa
unstable will pull in dependencies from MelpaStable (even when Melpa
has the dependency). This moves melpa unstable and stable into their
own scopes to keep them separate.
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Partial log (click to expand)


 93 5892k   93 5515k    0     0  6496k      0 --:--:-- --:--:-- --:--:-- 6488k
100 5892k  100 5892k    0     0  6658k      0 --:--:-- --:--:-- --:--:-- 6651k

fetching path ‘/nix/store/0g23bp3hp8pskaki9h525fnn24s956h7-emacs-25.3’...

*** Downloading ‘https://cache.nixos.org/nar/1gvaip2hk179204h2g3p8357h25z17syf1wjdmyky21fbp4m1l7q.nar.xz’ (signed by ‘cache.nixos.org-1’) to ‘/nix/store/0g23bp3hp8pskaki9h525fnn24s956h7-emacs-25.3’...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0 40.1M    0  122k    0     0   176k      0  0:03:53 --:--:--  0:03:53  176k
 30 40.1M   30 12.3M    0     0  7538k      0  0:00:05  0:00:01  0:00:04 7534k
 66 40.1M   66 26.6M    0     0   9.7M      0  0:00:04  0:00:02  0:00:02 9998k
 98 40.1M   98 39.3M    0     0  10.8M      0  0:00:03  0:00:03 --:--:-- 10.8M
100 40.1M  100 40.1M    0     0  10.8M      0  0:00:03  0:00:03 --:--:-- 10.8M

/nix/store/0g23bp3hp8pskaki9h525fnn24s956h7-emacs-25.3

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Partial log (click to expand)

copying path '/nix/store/1w2mckqhj58wr8pncmng1a3b9fjvwv8x-xkeyboard-config-2.22' from 'https://cache.nixos.org'...
copying path '/nix/store/vkds50qwiy1p7lh3yiyjwbribgkkks5b-libcroco-0.6.12' from 'https://cache.nixos.org'...
copying path '/nix/store/6idvprrni48kygm59gmnxrhh9vglrqdc-libXtst-1.2.3' from 'https://cache.nixos.org'...
copying path '/nix/store/krg64b0jws8y1q5pr8w1z05nc18gg2xw-librsvg-2.42.2' from 'https://cache.nixos.org'...
copying path '/nix/store/ald1xssfvf5w494mh6spkjsm2c18q6mr-at-spi2-core-2.26.2' from 'https://cache.nixos.org'...
copying path '/nix/store/8q3rliljdyyd2v7qjfc1drq9w70s851p-libxkbcommon-0.7.2' from 'https://cache.nixos.org'...
copying path '/nix/store/kzjv5h6180v9z1j3sh6paqn5f3npcf80-at-spi2-atk-2.26.1' from 'https://cache.nixos.org'...
copying path '/nix/store/4mn7c603p4ayvl6h0rrmsmxdprm7vlps-gtk+3-3.22.26' from 'https://cache.nixos.org'...
copying path '/nix/store/z9xhv47771sfzvmklk717gfqxw8g6sp5-emacs-25.3' from 'https://cache.nixos.org'...
/nix/store/z9xhv47771sfzvmklk717gfqxw8g6sp5-emacs-25.3

@ttuegel
Copy link
Member

ttuegel commented Mar 6, 2018

Shouldn't break anything, but interested in feedback if it does.

Suppose package A depends on C-1.0 from Melpa Stable and package B depends on C-20180305 from Melpa. Currently in Nixpkgs, this problem is treated by preferring the version from Melpa Stable. If Melpa and Melpa Stable are given their own scopes, then including A and B in the same configuration will pull in both versions of C, but Emacs will only load one. Critically, the user does not directly choose which one is loaded. (It will depend on the load path order, which depends indirectly on the order of packages in the Nix configuration.) This is a general problem with interpreted languages, but Emacs feels it very acutely.

I can't offer a deep solution to the problem, but count me as a strong -1 on creating multiple Emacs package scopes.

The surface problem here is that the packages in Melpa Stable are ancient garbage. I suggest we can solve that problem by dropping Melpa Stable. I have never found a case where a package in Stable worked, but a package in Melpa did not; however, I have found dozens of cases where a Stable package is broken, but the Melpa version works. In the event that a Melpa package is broken, we can always make an individual package override.

@matthewbauer
Copy link
Member Author

An alternative solution to this would be to move "melpaPackages" after "melpaStablePackages" in the scope. That would just switch it so that "unstable" dependencies are always pulled in (instead of always stable dependencies as it is currently).

@matthewbauer
Copy link
Member Author

Here's a an alternative fix for my use case:

matthewbauer@6f341ce

This would at least get my config working again- but again we run into the multiple versions of the same package issue. The thing I like about the separate scopes is that it doesn't cross melpa and melpa stable so that if you're "smart" at using it, you wouldn't get any conflicts. Right now you're going to have issues if you ever use an unstable package that depends on another unstable package.

@matthewbauer
Copy link
Member Author

Closing in favor of #36423

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong dependencies with MELPA
3 participants