Skip to content

libnixf(sema-primop-unknown): false-positive for experimental features #762

@MattSturgeon

Description

@MattSturgeon

Describe the bug

When linting builtins.getFlake, getFlake is flagged as an unknown builtin. I assume this is because it is gated behind experimental-features=flakes.

[sema-primop-unknown] Error: unknown builtin `getFlake`
    ╭─[nvim/config/_nixd-expr.nix:84:21]
    │
 84 │   global = builtins.getFlake self;
    ·                     ────┬───
    ·                         ╰───── unknown builtin `getFlake`
────╯
$ nix repl
Nix 2.31.2+1
Type :? for help.
nix-repl> builtins.getFlake
«primop getFlake»

Additional context
"impure" features don't seem to false-positive, e.g. builtins.currentSystem is not flagged. I've only reproduced this with getFlake, so far.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions