Skip to content

builtins contains itself recursively #7289

Closed

Description

@fricklerhandwerk

Describe the bug

builtins contains itself, recursively.

This seems unintentional?

Steps To Reproduce

nix-repl> builtins.builtins.builtins == builtins
true

Expected behavior

nix-repl> builtins.builtins
error: attribute 'builtins' missing

       at «string»:1:1:

            1| builtins.builtins
             | ^

nix-env --version output

nix (Nix) 2.11.0

Additional context

Activity

  1. added
    language
    on Nov 11, 2022
  2. infinisil commented on Nov 11, 2022

    @infinisil
    Member

    It kinda makes sense, builtins itself is a builtin value, so it should be in builtins, therefore builtins.builtins. But I can neither think of a valid use case for this nor a problem that would be caused by this.

  3. alex-ameen commented on Nov 18, 2022

    @alex-ameen
    Contributor

    I want to find a use case for this. Is this related to scopedImport at all?

  4. roberth commented on Mar 29, 2023

    @roberth
    Member

    It has existed for a long time, so it's not worth breaking someone's expression over what seems to be aesthetics, it is unlikely to cause problems and

    It kinda makes sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    languagequestion

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions