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-modes: build MELPA package sets without null packages #86213

Merged

Conversation

afrepues
Copy link
Contributor

@afrepues afrepues commented Apr 28, 2020

This is the counterpart or #83378 to get the fix into 20.03.

Motivation for this change

See #83378

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

The current algorithm creates attributes with null values for packages
with no source in a variant of MELPA. Though will satify dependencies
they produce no files, and though a build that transitively depends on
one them will be successful, Emacs won't find them and any code
depending on them won't work.

The solution with minimal code change would have been filtering the
list of results from melpaDerivation by comparing the value against
null, but that leads to an infinite recursion.

This commit also moves legacy renames from the shared to the unstable
set, as the corresponding null value elements won't exist in the
stable set anymore.

The test used for the problem was:

  $ nix-build --show-trace ./default.nix -A emacs26Packages.melpaStablePackages.findr
  error: expression does not evaluate to a derivation (or a set or list of those)

The expected output, obtained with this commit is:

  $ nix-build --show-trace ./default.nix -A emacs26Packages.melpaStablePackages.findr
  error: attribute 'findr' in selection path 'emacs26Packages.melpaStablePackages.findr' not found
@afrepues afrepues marked this pull request as ready for review April 28, 2020 14:20
@adisbladis adisbladis merged commit 2437cd6 into NixOS:release-20.03 Apr 28, 2020
@adisbladis
Copy link
Member

Thank you!

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.

None yet

2 participants