Skip to content

Create proper serializer for BuildResult status#14749

Merged
Ericson2314 merged 1 commit into
NixOS:masterfrom
obsidiansystems:build-status-serializer
Jan 26, 2026
Merged

Create proper serializer for BuildResult status#14749
Ericson2314 merged 1 commit into
NixOS:masterfrom
obsidiansystems:build-status-serializer

Conversation

@Ericson2314
Copy link
Copy Markdown
Member

Motivation

The casts were not safe with respect to unknown values, but these are.

Context


Add 👍 to pull requests you find important.

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

@github-actions github-actions Bot added the store Issues and pull requests concerning the Nix store label Dec 9, 2025
@Ericson2314 Ericson2314 force-pushed the build-status-serializer branch from 06fc951 to 49a6aa7 Compare January 23, 2026 19:35
The casts were not safe with respect to unknown values, but these are.
auto rawStatus = readNum<uint8_t>(conn.from);

if (rawStatus >= std::size(buildResultStatusTable))
throw Error("Invalid BuildResult status %d from remote", rawStatus);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a problem arises, can make this a warning and use a default, but I rather start with this stricter logic, in hope that it is not a problem in practice.

@Ericson2314 Ericson2314 added this pull request to the merge queue Jan 26, 2026
Merged via the queue into NixOS:master with commit a7c043b Jan 26, 2026
14 checks passed
@Ericson2314 Ericson2314 deleted the build-status-serializer branch January 26, 2026 21:23
brittonr pushed a commit to brittonr/nix that referenced this pull request Apr 1, 2026
…alizer

Create proper serializer for BuildResult status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

store Issues and pull requests concerning the Nix store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants