Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 5feba458a260
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: b450083ee31f
Choose a head ref
  • 4 commits
  • 5 files changed
  • 1 contributor

Commits on Dec 11, 2018

  1. bundlerEnv: ensure dependencies always included

    Suppose I have a Gemfile like this:
    
        source "https://rubygems.org"
        gem "actioncable"
        gem "websocket-driver", group: :test
    
    The gemset.nix generated by Bundix 2.4.1 will set ActionCable's groups
    to [ "default" ], and websocket-driver's to [ "test" ]. This means that
    the generated bundlerEnv wouldn't include websocket-driver unless the
    test group was included, even though it's required by the default group.
    
    This is arguably a bug in Bundix (websocket-driver's groups should
    probably be [ "default" "test" ] or just [ "default" ]), but there's no
    reason bundlerEnv should omit dependencies even given such an input --
    it won't necessarily come from Bundix, and it would be good for
    bundlerEnv to do the right thing.
    
    To fix this, filterGemset is now a recursive function, that adds
    dependencies of gems in the group to the filtered gemset until it
    stabilises on the gems that match the required groups, and all of their
    recursive dependencies.
    alyssais committed Dec 11, 2018
    Copy the full SHA
    67b1265 View commit details
    Browse the repository at this point in the history
  2. bundlerEnv: include all groups by default

    This wasn't really an issue until the latest minor release of Bundix
    (2.4), because prior to then Bundix didn't emit group attributes, and so
    this functionality of bundlerEnv wasn't really used. However, it is now
    apparent that a better default for bundlerEnv would be to include all
    gem groups by default, not just the default group. This matches the
    behavior of Bundler, and makes more sense, because the default group
    alone isn't necessarily useful for anything -- consider a Rails app with
    production, development, and test groups. It has the additional benefit
    of being backwards compatible with how this would have worked before the
    Bundix update.
    alyssais committed Dec 11, 2018
    Copy the full SHA
    83a2d99 View commit details
    Browse the repository at this point in the history
  3. bundlerEnv: always include default gems

    "default" isn't really a group, it's more the absence of one. With
    Bundler, this means that a gem should be installed unconditionally,
    regardless of which groups are specified. It doesn't really make sense
    to allow these gems to be omitted from a bundlerEnv.
    alyssais committed Dec 11, 2018
    Copy the full SHA
    26053ca View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2018

  1. Merge pull request #51884 from alyssais/bundlerEnv-groups

    bundlerEnv: improve handling of groups
    alyssais committed Dec 12, 2018
    Copy the full SHA
    b450083 View commit details
    Browse the repository at this point in the history