Skip to content

Indicate that sandbox-paths specifies a missing file in the corresponding error message.#88

Merged
cole-h merged 1 commit into
detsys-mainfrom
fh-846-improve-nix-error-when-sandbox-path-doesnt-exist
Jun 4, 2025
Merged

Indicate that sandbox-paths specifies a missing file in the corresponding error message.#88
cole-h merged 1 commit into
detsys-mainfrom
fh-846-improve-nix-error-when-sandbox-path-doesnt-exist

Conversation

@cole-h
Copy link
Copy Markdown
Member

@cole-h cole-h commented Jun 4, 2025

Motivation

Context


TODO:

  • write a test
  • make sure this passes Eelco's smell test
  • benchmark if performance is a concern?

@cole-h cole-h requested a review from edolstra June 4, 2025 18:24
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2025

@github-actions github-actions Bot temporarily deployed to pull request June 4, 2025 18:37 Inactive
@cole-h cole-h force-pushed the fh-846-improve-nix-error-when-sandbox-path-doesnt-exist branch from 6151fe5 to c5c3377 Compare June 4, 2025 19:06
Comment thread src/libstore/unix/build/derivation-builder.cc Outdated
@github-actions github-actions Bot temporarily deployed to pull request June 4, 2025 19:14 Inactive
@cole-h cole-h force-pushed the fh-846-improve-nix-error-when-sandbox-path-doesnt-exist branch from c5c3377 to dfa7b2a Compare June 4, 2025 19:16
@cole-h cole-h marked this pull request as ready for review June 4, 2025 19:17
@cole-h cole-h enabled auto-merge June 4, 2025 19:17
@cole-h cole-h added this pull request to the merge queue Jun 4, 2025
@github-actions github-actions Bot temporarily deployed to pull request June 4, 2025 19:29 Inactive
Merged via the queue into detsys-main with commit e98cad6 Jun 4, 2025
26 checks passed
@cole-h cole-h deleted the fh-846-improve-nix-error-when-sandbox-path-doesnt-exist branch June 4, 2025 20:21
@grahamc grahamc changed the title libstore/unix/derivation-builder: error earlier when sandbox path is inaccessible Indicate that sandbox-paths specifies a missing file in the corresponding error message. Jun 12, 2025
brittonr added a commit to brittonr/nix that referenced this pull request Mar 16, 2026
Cherry-picked from DeterminateSystems#88, adapted for 2.33.3.

In 2.33.3 the sandbox-paths setting is parsed in globals.cc (not
derivation-builder.cc as in the DS fork), so the check goes in
BaseSetting<PathsInChroot>::parse(). Non-optional paths that don't
exist now throw immediately at parse time instead of silently
producing a broken sandbox.
brittonr added a commit to onixcomputer/onix-core that referenced this pull request Mar 17, 2026
Cherry-picked DeterminateSystems/nix-src#88 onto our wasm-2.33.3 fork.
Non-optional sandbox-paths that reference missing files now throw
immediately at parse time instead of silently producing a broken
sandbox.

The hung-downloads fix (DS#327) was skipped — the maxQueueSize pattern
it fixes doesn't exist in upstream 2.33.3's filetransfer architecture.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants