Skip to content

Commit

Permalink
lib: add deprecation warning for __empty
Browse files Browse the repository at this point in the history
  • Loading branch information
FrothyMarrow committed May 21, 2024
1 parent af72dc1 commit ac20dfb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/lua.nix
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ in rec {
then
if isLuaInline args
then args.expr
else if hasAttr "__empty" args
then
lib.warn ''
Using `__empty` to define an empty lua table is deprecated. Use an empty attrset instead.
'' "{ }"
else
"{"
+ (concatStringsSep ","
Expand Down

0 comments on commit ac20dfb

Please sign in to comment.