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

print type and value in "flake attr is not a derivation" errors #10779

Merged
merged 2 commits into from
May 29, 2024

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented May 25, 2024

Motivation

Make nix build errors easier to understand

Context

Source: https://git.lix.systems/lix-project/lix/commit/20981461d4a2a62c68f4bc7c4258473f7cd7d8e1

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@lf-
Copy link
Member

lf- commented May 27, 2024

You could backport the release notes generator from Lix so the original change authors are credited in changelogs :P

@Mic92 Mic92 force-pushed the better-installable-errors branch from dfe5f87 to eb3b05a Compare May 28, 2024 07:08
@fricklerhandwerk fricklerhandwerk added the error-messages Confusing messages and better diagnostics label May 28, 2024
@Mic92
Copy link
Member Author

Mic92 commented May 28, 2024

You could backport the release notes generator from Lix so the original change authors are credited in changelogs :P

Good idea. Do you want to make a pull request? I am still busy with other things.

This turns errors like:

error: flake output attribute 'hydraJobs' is not a derivation or path

into errors like:

error: expected flake output attribute 'hydraJobs' to be a derivation or
path but found a set: { binaryTarball = «thunk»; build = «thunk»; etc> }

This change affects all InstallableFlake commands.

Source: https://git.lix.systems/lix-project/lix/commit/20981461d4a2a62c68f4bc7c4258473f7cd7d8e1
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
@Mic92 Mic92 force-pushed the better-installable-errors branch from eb3b05a to 1e01969 Compare May 28, 2024 07:17
@fricklerhandwerk fricklerhandwerk merged commit 18ac654 into NixOS:master May 29, 2024
9 checks passed
@Mic92 Mic92 deleted the better-installable-errors branch July 25, 2024 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation error-messages Confusing messages and better diagnostics
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants