Skip to content

fix: null coercion in disambiguate warning message - #576

Merged
sini merged 1 commit into
denful:mainfrom
sini:fix/disambiguate-null-system
May 29, 2026
Merged

sini merged 1 commit into
denful:mainfrom
sini:fix/disambiguate-null-system

Conversation

@sini

@sini sini commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • entry.system or "unknown" in the disambiguation warning throws cannot coerce null to a string when entry.system is null
  • Nix's or only applies to attribute access (a.b or default), not standalone values
  • Use explicit if check instead

Introduced in #565 (0b250e17).

Test plan

  • nix flake check passes
  • Flake with duplicate instantiate specs on null-system entities no longer crashes

@sini
sini requested a review from vic as a code owner May 29, 2026 23:10
@github-actions github-actions Bot added the allow-ci allow all CI integration tests label May 29, 2026
@sini
sini requested a review from theutz May 29, 2026 23:11
`entry.system or "unknown"` doesn't work when `entry.system` is
null — Nix's `or` only applies to attribute access, not standalone
values. String interpolation of null throws "cannot coerce null to
a string".

Use explicit `if` instead.
@sini
sini force-pushed the fix/disambiguate-null-system branch from a999c6c to f2f466e Compare May 29, 2026 23:19
@sini
sini merged commit 30ebfdc into denful:main May 29, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

allow-ci allow all CI integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants