nix-shell doesn't understand the "undeprecate URL literals" flag #523

Closed
opened 2024-09-14 02:15:26 +00:00 by danderson · 4 comments

Describe the bug

nix-shell admonishes that you should use --extra-deprecated-features=url-literals to evaluate legacy shell.nix files, but doesn't understand that flag.

Steps to reproduce

Attempt to load nextpnr's nix shell (https://github.com/YosysHQ/nextpnr/blob/master/shell.nix)

> nix-shell
error: URL literals are deprecated, allow using them with --extra-deprecated-features=url-literals
       at /home/dave/hack/nextpnr/shell.nix:1:31:
            1| { pkgs ? import (fetchTarball https://github.com/NixOS/nixpkgs/archive/24.05.tar.gz) {} }:
             |                               ^
            2|

> nix-shell --extra-deprecated-features=url-literals
error: unrecognised flag '--extra-deprecated-features=url-literals'
Try 'nix-shell --help' for more information.

Expected behavior

nix-shell should understand the flag it recommends, or have a different error message

nix --version output

nix (Lix, like Nix) 2.92.0-dev-pre20240912-b2fc007

Additional context

Easy to fix by fixing the shell.nix of course, just a minor UI hiccup.

## Describe the bug nix-shell admonishes that you should use --extra-deprecated-features=url-literals to evaluate legacy shell.nix files, but doesn't understand that flag. ## Steps to reproduce Attempt to load nextpnr's nix shell (https://github.com/YosysHQ/nextpnr/blob/master/shell.nix) ```bash > nix-shell error: URL literals are deprecated, allow using them with --extra-deprecated-features=url-literals at /home/dave/hack/nextpnr/shell.nix:1:31: 1| { pkgs ? import (fetchTarball https://github.com/NixOS/nixpkgs/archive/24.05.tar.gz) {} }: | ^ 2| > nix-shell --extra-deprecated-features=url-literals error: unrecognised flag '--extra-deprecated-features=url-literals' Try 'nix-shell --help' for more information. ``` ## Expected behavior nix-shell should understand the flag it recommends, or have a different error message ## `nix --version` output `nix (Lix, like Nix) 2.92.0-dev-pre20240912-b2fc007` ## Additional context Easy to fix by fixing the shell.nix of course, just a minor UI hiccup.
danderson added the
bug
label 2024-09-14 02:15:26 +00:00
Owner

What's deleting the = sign do in there? I have a suspicion it might be the bug you're finding, cuz long options that are config settings do generally work with the legacy commands. also cc @piegames

What's deleting the = sign do in there? I have a suspicion it might be the bug you're finding, cuz long options that are config settings do generally work with the legacy commands. also cc @piegames
Member

Yeah, that is a fuckup of mine, though arguably the issue is with this horrible CLI parser not accepting = between argument and value. Still, sorry for that. (IIRC pennae noticed and told me some weeks ago, but it kinda fell through the cracks of other stuff I'm doing)

Yeah, that is a fuckup of mine, though arguably the issue is with this horrible CLI parser not accepting `=` between argument and value. Still, sorry for that. (IIRC pennae noticed and told me some weeks ago, but it kinda fell through the cracks of other stuff I'm doing)
jade added the
Area/cli
label 2024-09-14 19:21:13 +00:00
Owner

yeah no worries i am not blaming you, i just think you want to know of this issue :)

yeah no worries i am not blaming you, i just think you want to know of this issue :)
jade added this to the 2.92 milestone 2024-09-15 08:39:34 +00:00
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/2077 ("libexpr: Fix typo in error message")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/2077", "number": 2077, "kind": "commit message"}], "cl_meta": {"2077": {"change_title": "libexpr: Fix typo in error message"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/2077](https://gerrit.lix.systems/c/lix/+/2077) ("libexpr: Fix typo in error message")
Sign in to join this conversation.
No milestone
No project
No assignees
4 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#523
No description provided.