Skip to content

Fix: allow top-level empty follows - #50

Merged
vic merged 1 commit into
mainfrom
toplevel
Nov 21, 2025
Merged

vic merged 1 commit into
mainfrom
toplevel

Conversation

@vic

@vic vic commented Nov 21, 2025 •

Copy link
Copy Markdown
Member

Fixes #47

Copilot AI review requested due to automatic review settings November 21, 2025 05:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the handling of empty follows strings at the top level of flake inputs. The change modifies the follows option type from str with default "" to nullOr str with default null, and updates the filtering logic to preserve empty string values in the generated flake expressions.

Key changes:

  • Changed the follows option type to allow null as the default value instead of an empty string
  • Updated the testEmpty predicate for follows fields to check if a value is not a string (filtering out null values while keeping all strings, including empty ones)
  • Added test coverage for top-level inputs with empty follows strings

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
modules/options/inputs.nix Changed follows-option type from str to nullOr str and default from "" to null
dev/modules/_lib/default.nix Updated testEmpty logic for follows to !builtins.isString to preserve empty strings while filtering non-strings
dev/modules/unit-tests/inputsExpr.nix Added test case for top-level input with empty follows string

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vic
vic merged commit ea47040 into main Nov 21, 2025
@vic
vic deleted the toplevel branch November 21, 2025 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test top-level follows = "";

2 participants