beamPackages.elixir: avoid throwing for incompatibility in CI
These asserts should only trigger when a user tries to use that combination. In CI, they should just not create an attrpath to evaluate.
This commit is contained in:
parent
9255558c37
commit
093e7390f1
@ -1,4 +1,5 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
@ -57,6 +58,8 @@ let
|
||||
true
|
||||
else
|
||||
versionOlder (versions.major (getVersion erlang)) maxShiftMajor;
|
||||
minAssert = versionAtLeast (getVersion erlang) minimumOTPVersion;
|
||||
bothAssert = minAssert && maxAssert;
|
||||
|
||||
elixirShebang =
|
||||
if stdenv.hostPlatform.isDarwin then
|
||||
@ -70,9 +73,11 @@ let
|
||||
|
||||
erlc_opts = [ "deterministic" ] ++ optionals debugInfo [ "debug_info" ];
|
||||
in
|
||||
assert assertMsg (versionAtLeast (getVersion erlang) minimumOTPVersion) compatibilityMsg;
|
||||
assert assertMsg maxAssert compatibilityMsg;
|
||||
|
||||
if !config.allowAliases && !bothAssert then
|
||||
# Don't throw without aliases to not break CI.
|
||||
null
|
||||
else
|
||||
assert assertMsg bothAssert compatibilityMsg;
|
||||
stdenv.mkDerivation {
|
||||
pname = "${baseName}";
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user