summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/rangehttpserver
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2023-07-04 13:09:27 -0700
committerAdam Joseph <adam@westernsemico.com>2023-07-04 13:39:19 -0700
commitd278fd78af3cc0c9ccbff0ca9fbc37edb55fe97f (patch)
tree20628c8a75f521b6ee4265e4a35ea622548afd32 /pkgs/development/python-modules/rangehttpserver
parent083a9cb41fcc9058d669e9aa6960cd8b2f1c36ff (diff)
lib.systems.extensions.sharedLibrary: do not `throw`
Because downstream code expects to use `==` on platform attrsets, we are unfortunately not able to throw a useful error message when the `sharedLibrary` attribute is accessed. When users do a comparison like: stdenv.hostPlatform == pkgsStatic.stdenv.hostPlatform ... in a situation where `stdenv.hostPlatform.hasSharedLibraries`, they expect this to return `false`. Unfortunately Nix does a deep equality comparison here, and ends up forcing the `pkgsStatic.stdenv.hostPlatform.extensions.sharedLibrary` attribute, which throws the error. Rather than returning `null`, this commit instead simply omits the `extensions.sharedLibrary` attribute. This provides the user with a more-useful error message: instead of waiting until the `null` is used (and hoping that produces an error), the user will get an error about the `extensions.sharedLibrary` attribute being missing, at the position where it was referenced. Big thanks to @trofi for his PR to add `NIX_VALIDATE_EVAL_NONDETERMINISM` to Nix, which I am now using. It made tracking this down really easy! Fixes #244045
Diffstat (limited to 'pkgs/development/python-modules/rangehttpserver')
0 files changed, 0 insertions, 0 deletions