Skip to content

exportReferencesGraph: Handle heterogeneous arrays#14189

Merged
edolstra merged 1 commit into
masterfrom
fix-exportReferencesGraph
Oct 8, 2025
Merged

exportReferencesGraph: Handle heterogeneous arrays#14189
edolstra merged 1 commit into
masterfrom
fix-exportReferencesGraph

Conversation

@edolstra
Copy link
Copy Markdown
Member

@edolstra edolstra commented Oct 8, 2025

Motivation

This barfed with

error: [json.exception.type_error.302] type must be string, but is array

on nix build github:malt3/bazel-env#bazel-env because it has a exportReferencesGraph with a value like ["string",...["string"]].

Context


Add 👍 to pull requests you find important.

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

@edolstra edolstra added the regression Something doesn't work anymore label Oct 8, 2025
@edolstra edolstra requested a review from Ericson2314 as a code owner October 8, 2025 18:20
@edolstra edolstra added backport 2.28-maintenance Automatically creates a PR against the branch backport 2.29-maintenance Automatically creates a PR against the branch backport 2.30-maintenance Automatically creates a PR against the branch backport 2.31-maintenance Automatically creates a PR against the branch backport 2.32-maintenance Automatically creates a PR against the branch labels Oct 8, 2025
@github-actions github-actions Bot added the with-tests Issues related to testing. PRs with tests have some priority label Oct 8, 2025
@xokdvium
Copy link
Copy Markdown
Contributor

xokdvium commented Oct 8, 2025

Any idea when this was broken?

@edolstra edolstra removed the backport 2.28-maintenance Automatically creates a PR against the branch label Oct 8, 2025
@edolstra
Copy link
Copy Markdown
Member Author

edolstra commented Oct 8, 2025

Since 2.29. There was a partial fix before (#13256) but it didn't handle the case of nested arrays.

@cole-h
Copy link
Copy Markdown
Member

cole-h commented Oct 8, 2025

It was pretty frustrating to bisect this since it kept pointing to that same area we fixed last time 😅

Luckily, Eelco was able to peek inside the unhappy-value and figure out what was wrong before I lost any more hair.

(Downstream ref: DeterminateSystems#221)

Comment thread src/libstore/derivation-options.cc Outdated
@edolstra edolstra force-pushed the fix-exportReferencesGraph branch from 87c6b02 to e60ff9c Compare October 8, 2025 19:32
This barfed with

   error: [json.exception.type_error.302] type must be string, but is array

on `nix build github:malt3/bazel-env#bazel-env` because it has a `exportReferencesGraph` with a value like `["string",...["string"]]`.
@edolstra edolstra force-pushed the fix-exportReferencesGraph branch from e60ff9c to 94f410b Compare October 8, 2025 20:15
@edolstra edolstra added this pull request to the merge queue Oct 8, 2025
Merged via the queue into master with commit d591f17 Oct 8, 2025
38 checks passed
@edolstra edolstra deleted the fix-exportReferencesGraph branch October 8, 2025 23:12
@internal-nix-ci
Copy link
Copy Markdown

Backport failed for 2.29-maintenance, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 2.29-maintenance
git worktree add -d .worktree/backport-14189-to-2.29-maintenance origin/2.29-maintenance
cd .worktree/backport-14189-to-2.29-maintenance
git switch --create backport-14189-to-2.29-maintenance
git cherry-pick -x 94f410b628ede2ecec6ed06cbb0f62e1f9d9e8cf

@internal-nix-ci
Copy link
Copy Markdown

Backport failed for 2.30-maintenance, because it was unable to cherry-pick the commit(s).

Please cherry-pick the changes locally and resolve any conflicts.

git fetch origin 2.30-maintenance
git worktree add -d .worktree/backport-14189-to-2.30-maintenance origin/2.30-maintenance
cd .worktree/backport-14189-to-2.30-maintenance
git switch --create backport-14189-to-2.30-maintenance
git cherry-pick -x 94f410b628ede2ecec6ed06cbb0f62e1f9d9e8cf

@internal-nix-ci
Copy link
Copy Markdown

Successfully created backport PR for 2.31-maintenance:

@internal-nix-ci
Copy link
Copy Markdown

Successfully created backport PR for 2.32-maintenance:

edolstra added a commit to DeterminateSystems/nix-src that referenced this pull request Oct 9, 2025
github-merge-queue Bot pushed a commit to DeterminateSystems/nix-src that referenced this pull request Oct 9, 2025
@nixos-discourse
Copy link
Copy Markdown

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/nix-2-32-0-released/70528/8

malt3 added a commit to malt3/bazel-env that referenced this pull request Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.29-maintenance Automatically creates a PR against the branch backport 2.30-maintenance Automatically creates a PR against the branch backport 2.31-maintenance Automatically creates a PR against the branch backport 2.32-maintenance Automatically creates a PR against the branch regression Something doesn't work anymore 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.

5 participants