"Deprecated features" error in repl when:add-ing on builtins and attempting to use true, false, and null #1176

Open
opened 2026-04-05 13:29:40 +00:00 by mbekkomo · 3 comments

Describe the bug

Lix throws "deprecated features" error when using :add on builtins and attempting to use true, false, and null.

$ nix repl
Lix 2.95.1
Type :? for help.
nix-repl> :a builtins
Added 117 variables.

nix-repl> true
error: Shadowing symbol 'true' used in internal expressions is not allowed. Use --extra-deprecated-features shadow-internal-symbols to disable this error.
       at «string»:1:1:
            1| true
             | ^

Steps To Reproduce

  1. Type nix repl.
  2. Type :add builtins.
  3. Type true.

Expected behavior

Lix doesn't complain and simply move on.

nix --version output

nix (Lix, like Nix) 2.95.1
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/komo/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/komo/.local/share/flatpak/exports/etc/xdg/nix/nix.conf:/var/lib/flatpak/exports/etc/xdg/nix/nix.conf:/home/komo/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/komo/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/komo/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/8ywqcanm1ggrrzl2fx22j6zd6gdl9x2w-lix-2.95.1/share

Additional context

Currently none.

## Describe the bug Lix throws "deprecated features" error when using `:add` on `builtins` and attempting to use `true`, `false`, and `null`. ``` $ nix repl Lix 2.95.1 Type :? for help. nix-repl> :a builtins Added 117 variables. nix-repl> true error: Shadowing symbol 'true' used in internal expressions is not allowed. Use --extra-deprecated-features shadow-internal-symbols to disable this error. at «string»:1:1: 1| true | ^ ``` ## Steps To Reproduce 1. Type `nix repl`. 2. Type `:add builtins`. 3. Type `true`. ## Expected behavior Lix doesn't complain and simply move on. ## `nix --version` output ``` nix (Lix, like Nix) 2.95.1 System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/komo/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/komo/.local/share/flatpak/exports/etc/xdg/nix/nix.conf:/var/lib/flatpak/exports/etc/xdg/nix/nix.conf:/home/komo/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/komo/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/komo/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/8ywqcanm1ggrrzl2fx22j6zd6gdl9x2w-lix-2.95.1/share ``` ## Additional context Currently none.
Owner

Note the workaround: --extra-deprecated-features shadow-internal-symbols.

This is definitely a bug though.

Note the workaround: `--extra-deprecated-features shadow-internal-symbols`. This is definitely a bug though.
Owner

why should this be a bug? we are literally shadowing the builtin names from global scope. that we happen to be shadowing them with the identical value is immaterial unless you want to disable the shadowing warning for all cases in which this happens, but that would undermine the entire point of having the warning in the first place?

why should this be a bug? we are *literally* shadowing the builtin names from global scope. that we happen to be shadowing them with the identical value is immaterial unless you want to disable the shadowing warning for all cases in which this happens, but that would undermine the entire point of having the warning in the first place?
Owner

I mean, is it really shadowing if it's the literally the exact object? I guess.

But from a UX perspective :add builtins is a very reasonable and obvious thing to want to do. Maybe :add should just skip internal symbol names instead of erroring on them?

Thankfully we don't have this problem with with since it doesn't shadow.

I mean, is it really shadowing if it's the literally the exact object? I guess. But from a UX perspective `:add builtins` is a very reasonable and obvious thing to want to do. Maybe `:add` should just skip internal symbol names instead of erroring on them? Thankfully we don't have this problem with `with` since it doesn't shadow.
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#1176
No description provided.