Skip to content

worker-protocol: replace version bit-shifting with structs#15155

Merged
Ericson2314 merged 1 commit into
NixOS:masterfrom
obsidiansystems:protocol-version-structs
Feb 5, 2026
Merged

worker-protocol: replace version bit-shifting with structs#15155
Ericson2314 merged 1 commit into
NixOS:masterfrom
obsidiansystems:protocol-version-structs

Conversation

@amaanq
Copy link
Copy Markdown
Member

@amaanq amaanq commented Feb 5, 2026

Motivation

This commit replaces the GET_PROTOCOL_MINOR(version) macros with a proper WorkerProto::Version struct. As a bonus, this also fixes some version checks that were incorrectly ignoring the major version number.


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 new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store labels Feb 5, 2026
@Ericson2314 Ericson2314 enabled auto-merge February 5, 2026 16:16
This commit replaces the `GET_PROTOCOL_MINOR(version)` macros with a proper `WorkerProto::Version` struct. As a bonus, this also fixes some version checks that were incorrectly ignoring the major version number.

Co-authored-by: Amaan Qureshi <git@amaanq.com>
auto-merge was automatically disabled February 5, 2026 16:51

Head branch was pushed to by a user without write access

@amaanq amaanq force-pushed the protocol-version-structs branch from 4dcceca to cccc944 Compare February 5, 2026 16:51
@Ericson2314 Ericson2314 added this pull request to the merge queue Feb 5, 2026
Merged via the queue into NixOS:master with commit 91c7068 Feb 5, 2026
14 checks passed
@Ericson2314 Ericson2314 deleted the protocol-version-structs branch February 5, 2026 18:52
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 6, 2026
This commit embeds the negotiated `FeatureSet` directly into `WorkerProto::Version` and introduces a `Number` subtype with total ordering, so that `Version` itself (number + features) only has partial ordering. This is a follow-up to NixOS#15155, cleaning up the separate `features` fields on `ReadConn`/`WriteConn`.

Co-authored-by: Amaan Qureshi <git@amaanq.com>
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 6, 2026
This commit embeds the negotiated `FeatureSet` directly into `WorkerProto::Version` and introduces a `Number` subtype with total ordering, so that `Version` itself (number + features) only has partial ordering. This is a follow-up to NixOS#15155, cleaning up the separate `features` fields on `ReadConn`/`WriteConn`.

Co-authored-by: Amaan Qureshi <git@amaanq.com>
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 6, 2026
This commit embeds the negotiated `FeatureSet` directly into `WorkerProto::Version` and introduces a `Number` subtype with total ordering, so that `Version` itself (number + features) only has partial ordering. This is a follow-up to NixOS#15155, cleaning up the separate `features` fields on `ReadConn`/`WriteConn`.

Co-authored-by: Amaan Qureshi <git@amaanq.com>
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 6, 2026
This commit embeds the negotiated `FeatureSet` directly into `WorkerProto::Version` and introduces a `Number` inner type with total ordering, so that `Version` itself (number + features) only has partial ordering. This is a follow-up to NixOS#15155, cleaning up the separate `features` fields on `ReadConn`/`WriteConn`.

Co-authored-by: Amaan Qureshi <git@amaanq.com>
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 6, 2026
This commit embeds the negotiated `FeatureSet` directly into `WorkerProto::Version` and introduces a `Number` inner type with total ordering, so that `Version` itself (number + features) only has partial ordering. This is a follow-up to NixOS#15155, cleaning up the separate `features` fields on `ReadConn`/`WriteConn`.

Co-authored-by: Amaan Qureshi <git@amaanq.com>
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 6, 2026
This commit embeds the negotiated `FeatureSet` directly into `WorkerProto::Version` and introduces a `Number` inner type with total ordering, so that `Version` itself (number + features) only has partial ordering. This is a follow-up to NixOS#15155, cleaning up the separate `features` fields on `ReadConn`/`WriteConn`.

Co-authored-by: Amaan Qureshi <git@amaanq.com>
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 6, 2026
This commit embeds the negotiated `FeatureSet` directly into `WorkerProto::Version` and introduces a `Number` inner type with total ordering, so that `Version` itself (number + features) only has partial ordering. This is a follow-up to NixOS#15155, cleaning up the separate `features` fields on `ReadConn`/`WriteConn`.

Co-authored-by: Amaan Qureshi <git@amaanq.com>
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 6, 2026
This commit embeds the negotiated `FeatureSet` directly into `WorkerProto::Version` and introduces a `Number` inner type with total ordering, so that `Version` itself (number + features) only has partial ordering. This is a follow-up to NixOS#15155, cleaning up the separate `features` fields on `ReadConn`/`WriteConn`.

Co-authored-by: Amaan Qureshi <git@amaanq.com>
amaanq added a commit to obsidiansystems/nix that referenced this pull request Feb 6, 2026
This commit embeds the negotiated `FeatureSet` directly into `WorkerProto::Version` and introduces a `Number` inner type with total ordering, so that `Version` itself (number + features) only has partial ordering. This is a follow-up to NixOS#15155, cleaning up the separate `features` fields on `ReadConn`/`WriteConn`.

Co-authored-by: Amaan Qureshi <git@amaanq.com>
brittonr pushed a commit to brittonr/nix that referenced this pull request Apr 1, 2026
…structs

worker-protocol: replace version bit-shifting with structs
brittonr pushed a commit to brittonr/nix that referenced this pull request Apr 1, 2026
This commit embeds the negotiated `FeatureSet` directly into `WorkerProto::Version` and introduces a `Number` inner type with total ordering, so that `Version` itself (number + features) only has partial ordering. This is a follow-up to NixOS#15155, cleaning up the separate `features` fields on `ReadConn`/`WriteConn`.

Co-authored-by: Amaan Qureshi <git@amaanq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants