nixpkgs/pkgs
Silvan Mosberger 86f4de6ee9
release-lib: Don't use tryEval for packagePlatforms
This use of tryEval causes hydra to fully ignore evaluation failures of
packages that occur while trying to evaluate the hydra platforms it should be
built on. This includes failures that occur during evaluation of:
- The `.type` attribute value
- The `.meta.hydraPlatforms` or `.meta.platforms` attribute value
  - The `.version` attribute, since this can determine whether
    `.meta.position` is set
- For non-derivations, `.recurseForDerivations` or `.recurseForRelease`

Here's a minimal `release.nix` file, showcasing how a `.version` failure
is ignored:

  let
    packages = pkgs: {
      success = pkgs.stdenv.mkDerivation {
        name = "success";
      };
      ignoredFailure = pkgs.stdenv.mkDerivation {
        pname = "ignored-failure";
        version = throw "version error";
      };
      caughtFailure = pkgs.stdenv.mkDerivation {
        name = "caught-failure";
        src = throw "src error";
      };
    };

    releaseLib = import <nixpkgs/pkgs/top-level/release-lib.nix> {
      packageSet = args: packages (import <nixpkgs> args);
      supportedSystems = [ "x86_64-linux" ];
    };
  in
  releaseLib.mapTestOn (releaseLib.packagePlatforms releaseLib.pkgs)

Evaluating this with `hydra-eval-jobs` before this change yields:

  $ hydra-eval-jobs release.nix -I nixpkgs=/path/to/nixpkgs
  warning: `--gc-roots-dir' not specified
  error: "error: --- ThrownError --- hydra-eval-jobs\nsrc error"
  {
    "caughtFailure.x86_64-linux": {
      "error": "error: --- ThrownError --- hydra-eval-jobs\nsrc error"
    },
    "success.x86_64-linux": {
      "description": "",
      "drvPath": "/nix/store/q1sw933xd9bxfx6rcp0kqksbprj1wmwj-success.drv",
      "homepage": "",
      "isChannel": false,
      "license": "",
      "maintainers": "",
      "maxSilent": 7200,
      "nixName": "success",
      "outputs": {
        "out": "/nix/store/7awrz6hss4jjxvgbwi4wlyikncmslb7a-success"
      },
      "schedulingPriority": 100,
      "system": "x86_64-linux",
      "timeout": 36000
    }
  }

Where you can see that there is no job for the `ignoredFailure`
derivation. Compare this to after this change:

  $ hydra-eval-jobs release.nix -I nixpkgs=/path/to/nixpkgs
  warning: `--gc-roots-dir' not specified
  error: "error: --- ThrownError --- hydra-eval-jobs\nsrc error"
  error: "error: --- ThrownError --- hydra-eval-jobs\nversion error"
  {
    "caughtFailure.x86_64-linux": {
      "error": "error: --- ThrownError --- hydra-eval-jobs\nsrc error"
    },
    "ignoredFailure": {
      "error": "error: --- ThrownError --- hydra-eval-jobs\nversion error"
    },
    "success.x86_64-linux": {
      "description": "",
      "drvPath": "/nix/store/q1sw933xd9bxfx6rcp0kqksbprj1wmwj-success.drv",
      "homepage": "",
      "isChannel": false,
      "license": "",
      "maintainers": "",
      "maxSilent": 7200,
      "nixName": "success",
      "outputs": {
        "out": "/nix/store/7awrz6hss4jjxvgbwi4wlyikncmslb7a-success"
      },
      "schedulingPriority": 100,
      "system": "x86_64-linux",
      "timeout": 36000
    }
  }

Notice how `ignoredFailure` is now part of the result.
2020-11-26 15:32:08 +01:00
..
applications Merge pull request #103037 from lightdiscord/package-update/protonmail-bridge 2020-11-26 15:05:23 +01:00
build-support utillinux: rename to util-linux 2020-11-24 12:42:06 -05:00
common-updater scripts/mark-broken: fix path 2020-11-25 13:08:27 -08:00
data Merge pull request #103795 from Jiehong/feature/update_tw 2020-11-26 01:45:49 +01:00
desktops gnome3.gnome-devel-docs: 3.38.1 -> 3.38.2 2020-11-25 11:05:20 +01:00
development Merge pull request #105027 from r-ryantm/auto-update/mkcert 2020-11-26 15:00:59 +01:00
games Merge pull request #102263 from Thra11/julius-1-5-1 2020-11-26 02:33:32 +01:00
misc Merge pull request #102661 from RonanMacF/tmuxPlugins 2020-11-26 03:43:27 +01:00
os-specific Merge pull request #105011 from r-ryantm/auto-update/light 2020-11-26 12:28:15 +01:00
pkgs-lib
servers Merge pull request #105006 from ymarkus/fix-postfixMySQL 2020-11-26 14:32:25 +01:00
shells oh-my-zsh: 2020-11-22 → 2020-11-25 2020-11-25 19:22:07 +00:00
stdenv gcc: update to isl 0.20.0 for bootstrapping and recent versions (#103311) 2020-11-17 21:20:48 +00:00
test haskell: Add documentationTarball to lib 2020-11-13 21:37:56 +01:00
tools Merge pull request #104956 from r-ryantm/auto-update/doppler 2020-11-26 13:40:25 +01:00
top-level release-lib: Don't use tryEval for packagePlatforms 2020-11-26 15:32:08 +01:00