Infinidoge / nix-minecraft

An attempt to better support Minecraft-related content for the Nix ecosystem
MIT License
174 stars 18 forks source link

Indescriptive error on port overlap assertion #28

Closed oatmealine closed 1 year ago

oatmealine commented 1 year ago

There is an assertion set to prevent two servers from using the same port. However, a message is not set, producing a confusing error when the assertion is triggered:

error: attribute 'message' missing

       at /nix/store/369wr4laqdqzh5brq1g7nfc1pbfh23sn-source/nixos/modules/system/activation/top-level.nix:122:30:

          121|
          122|   failedAssertions = map (x: x.message) (filter (x: !x.assertion) config.assertions);
             |                              ^
          123|
(use '--show-trace' to show detailed location information)
Infinidoge commented 1 year ago

Huh, I thought I would have set a message there, but apparently not!