beam/mixRelease: default stripDebug to false due frequent runtime errors (#232107)

This flag appears to cause issues in 3 out 4 users of mixRelease in
Nixpkgs, plus Mobilizon, which isn't merged yet. It might be safer to
set it to fals for now, as the runtime error messages produced by it are
quite cryptic.
This commit is contained in:
Kerstin 2023-05-16 10:50:34 +02:00 committed by GitHub
parent c8f6370f7d
commit 872987d040
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 8 deletions

View File

@ -16,6 +16,8 @@ in
mixRelease {
inherit pname version src elixir;
stripDebug = true;
mixFodDeps = fetchMixDeps {
pname = "mix-deps-${pname}";
inherit src version elixir;

View File

@ -9,16 +9,25 @@
, enableDebugInfo ? false
, mixEnv ? "prod"
, compileFlags ? [ ]
# mix fixed output derivation dependencies
, mixFodDeps ? null
# mix dependencies generated by mix2nix
# this assumes each dependency is built by buildMix or buildRebar3
# each dependency needs to have a setup hook to add the lib path to $ERL_LIBS
# this is how mix will find dependencies
, mixNixDeps ? { }
, elixir ? inputs.elixir
, hex ? inputs.hex.override { inherit elixir; }
, stripDebug ? true
# This reduces closure size, but can lead to some hard to understand runtime
# errors, so use with caution. See e.g.
# https://github.com/whitfin/cachex/issues/205
# https://framagit.org/framasoft/mobilizon/-/issues/1169
, stripDebug ? false
, ...
}@attrs:
let

View File

@ -31,9 +31,6 @@ beamPackages.mixRelease rec {
mix phx.digest --no-deps-check
'';
# cf. https://github.com/whitfin/cachex/issues/205
stripDebug = false;
mixNixDeps = import ./mix.nix {
inherit beamPackages lib;
overrides = (final: prev: {

View File

@ -17,7 +17,6 @@ beamPackages.mixRelease rec {
rev = "v${version}";
sha256 = "sha256-3iG2s7jVEnhq1kLLgtaHnFmLYBO2Xr5M5jjZfSNA9z4=";
};
stripDebug = false;
mixNixDeps = import ./mix.nix {
inherit beamPackages lib;

View File

@ -49,9 +49,6 @@ beamPackages.mixRelease {
nativeBuildInputs = [ nodejs ];
# https://github.com/whitfin/cachex/issues/205
stripDebug = false;
passthru = {
tests = { inherit (nixosTests) plausible; };
updateScript = ./update.sh;