Skip to content

local-derivation-goal: improve "illegal reference" error (backport #12105) #12752

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

Open
wants to merge 7 commits into
base: 2.24-maintenance
Choose a base branch
from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 25, 2025

Motivation

Before the change "illegal reference" was hard to interpret as it did not mention what derivation actually hits it.

Today's nixpkgs example:

Before the change:

$ nix build --no-link -f. postgresql_14
...
error: derivation contains an illegal reference specifier 'man'

After the change:

$ nix build --no-link -f. postgresql_14
...
error: derivation '/nix/store/bxp6g57limvwiga61vdlyvhy7i8rp6wd-postgresql-14.15.drv' output 'lib' contains an illegal reference specifier 'man', expected store path or output name (one of [debug, dev, doc, lib, out])

Context


Add 👍 to pull requests you find important.

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


This is an automatic backport of pull request #12105 done by [Mergify](https://mergify.com).

Before the change "illegal reference" was hard to interpret as it did
not mention what derivation actually hits it.

Today's `nixpkgs` example:

Before the change:

    $ nix build --no-link -f. postgresql_14
    ...
    error: derivation contains an illegal reference specifier 'man'

After the change:

    $ nix build --no-link -f. postgresql_14
    ...
    error: derivation '/nix/store/bxp6g57limvwiga61vdlyvhy7i8rp6wd-postgresql-14.15.drv' output check for 'lib' contains an illegal reference specifier 'man', expected store path or output name (one of [debug, dev, doc, lib, out])

(cherry picked from commit bbdc319)
@mergify mergify bot requested a review from Ericson2314 as a code owner March 25, 2025 15:48
@mergify mergify bot added automatic backport This PR is a backport produced by automation (does not trigger backporting) conflicts labels Mar 25, 2025
@mergify mergify bot requested a review from edolstra as a code owner March 25, 2025 15:48
@mergify mergify bot added the merge-queue label Mar 25, 2025
Copy link
Contributor Author

mergify bot commented Mar 25, 2025

Cherry-pick of f3dbaa3 has failed:

On branch mergify/bp/2.24-maintenance/pr-12105
Your branch is ahead of 'origin/2.24-maintenance' by 1 commit.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit f3dbaa3f5.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	deleted by us:   src/libutil-tests/strings.cc
	both modified:   src/libutil/strings.hh

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@github-actions github-actions bot added the with-tests Issues related to testing. PRs with tests have some priority label Mar 25, 2025
roberth and others added 6 commits March 27, 2025 11:43
(cherry picked from commit f3dbaa3)

# Conflicts:
#	src/libutil-tests/strings.cc
#	src/libutil/strings.hh
(cherry picked from commit 2b4d461)
Otherwise without the change the test fails on nix-2.26 as:

    error: derivation contains an illegal reference specifier 'dev'

Note: the error message does not match intended change.
(cherry picked from commit 1e7c724)
@Mic92 Mic92 force-pushed the mergify/bp/2.24-maintenance/pr-12105 branch from d22a869 to cdf4bcc Compare March 27, 2025 10:44
@Mic92 Mic92 enabled auto-merge March 27, 2025 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automatic backport This PR is a backport produced by automation (does not trigger backporting) conflicts merge-queue with-tests Issues related to testing. PRs with tests have some priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants