Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix-build suggests nix log (experimental CLI) to view logs #8118

Closed
bjornfor opened this issue Mar 27, 2023 · 1 comment · Fixed by #8122
Closed

nix-build suggests nix log (experimental CLI) to view logs #8118

bjornfor opened this issue Mar 27, 2023 · 1 comment · Fixed by #8122
Labels
bug new-cli Relating to the "nix" command

Comments

@bjornfor
Copy link
Contributor

Describe the bug

nix-build will, when a build fails, suggest to run nix log ..., which is an experimental CLI.

Steps To Reproduce

  1. Run nix-build on something that fails.
  2. nix-build will say ...For full logs, run 'nix log /nix/store/hash-name.drv'.
  3. And nix log /nix/store/hash-name.drv will fail with error: experimental Nix feature 'nix-command' is disabled; use '--extra-experimental-features nix-command' to override

Expected behavior

The CLI shouldn't suggest to run experimental commands, especially there are stable alternatives (nix-store -l).

nix-env --version ->2.11.1 (default Nix in NixOS 22.11)

Additional context

#7701 (CLI stabilization effort)

Priorities

Add 👍 to issues you find important.

@bjornfor bjornfor added the bug label Mar 27, 2023
@Ericson2314
Copy link
Member

@bjornfor If you want to make a PR with the message conditional one whether nix-comand is enabled, that sounds good to me!

bjornfor added a commit to bjornfor/nix that referenced this issue Mar 28, 2023
This fixes the issue that `nix-build`, without experimental feature
'nix-command' enabled, recommends the experimental CLI `nix log` to view
build logs. Now it'll recommend the stable `nix-store -l` CLI instead.

Fixes NixOS#8118
bjornfor added a commit to bjornfor/nix that referenced this issue Mar 28, 2023
This fixes the issue that `nix-build`, without experimental feature
'nix-command' enabled, recommends the experimental CLI `nix log` to view
build logs. Now it'll recommend the stable `nix-store -l` CLI instead.

Fixes NixOS#8118
@roberth roberth added the new-cli Relating to the "nix" command label Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug new-cli Relating to the "nix" command
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants