Skip to content

Remove comparator.hh and switch to <=> in a bunch of places#10838

Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:spaceship-no-comparator
Jul 12, 2024
Merged

Remove comparator.hh and switch to <=> in a bunch of places#10838
Ericson2314 merged 1 commit intoNixOS:masterfrom
obsidiansystems:spaceship-no-comparator

Conversation

@Ericson2314
Copy link
Member

Motivation

Progress on #10832

What remains for that issue is hopefully much easier!\

Context

Known behavior changes:

  • MemorySourceAccessor's comparison operators no longer forget to compare the SourceAccessor base class.

Priorities and Process

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 fetching Networking with the outside (non-Nix) world, input locking c api Nix as a C library with a stable interface labels Jun 3, 2024
@Ericson2314 Ericson2314 force-pushed the spaceship-no-comparator branch from c82645c to 2861ad2 Compare June 3, 2024 18:28
@Ericson2314 Ericson2314 enabled auto-merge June 3, 2024 18:28
@Ericson2314 Ericson2314 force-pushed the spaceship-no-comparator branch from 2861ad2 to f8a83b2 Compare June 5, 2024 22:06
@Ericson2314
Copy link
Member Author

@tfc Do you have any idea what's going on with this macOS failure? I gather libc++ doesn't like operator <=> with std::map and std::set but then I loose the scent.

@Ericson2314 Ericson2314 force-pushed the spaceship-no-comparator branch from f8a83b2 to 3a3cd54 Compare June 13, 2024 17:16
@Ericson2314 Ericson2314 force-pushed the spaceship-no-comparator branch 2 times, most recently from 7434918 to 7d84ab9 Compare July 12, 2024 17:39
Known behavior changes:

- `MemorySourceAccessor`'s comparison operators no longer forget to
  compare the `SourceAccessor` base class.

Progress on NixOS#10832

What remains for that issue is hopefully much easier!
@Ericson2314 Ericson2314 force-pushed the spaceship-no-comparator branch from 7d84ab9 to bc83b9d Compare July 12, 2024 18:54
@Ericson2314 Ericson2314 merged commit db3e99d into NixOS:master Jul 12, 2024
@Ericson2314 Ericson2314 deleted the spaceship-no-comparator branch July 12, 2024 20:37
@Ericson2314
Copy link
Member Author

OK yay, this passed finally:

  • The problem is libc++ 16 is too old. Nixpkgs will upgrade eventually.
  • Backed out of a bunch of <=> we didn't need like @roberth did, did operator < again for the rest.
  • TODOs so we now how to clean this up later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c api Nix as a C library with a stable interface fetching Networking with the outside (non-Nix) world, input locking new-cli Relating to the "nix" command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants