Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper parse and render functions for FileIngestionMethod and ContentAddressMethod #10009

Merged
merged 3 commits into from
Feb 13, 2024

Conversation

Ericson2314
Copy link
Member

Motivation

Needed for #9815

Context

No outward facing behavior is changed.

Older methods with same names that operate on on method + algo pair (for old-style <method>:algo) are renamed to *WithAlgo.)

The functions are unit-tested in the same way the names for the hash algorithms are tested.

Priorities and Process

Add 👍 to pull requests you find important.

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

…ContentAddressMethod`

No outward facing behavior is changed.

Older methods with same names that operate on on method + algo pair (for
old-style `<method>:algo`) are renamed to `*WithAlgo`.)

The functions are unit-tested in the same way the names for the hash
algorithms are tested.
@github-actions github-actions bot added new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store labels Feb 13, 2024
@github-actions github-actions bot added the fetching Networking with the outside (non-Nix) world, input locking label Feb 13, 2024
Copy link
Contributor

@9999years 9999years left a comment

Choose a reason for hiding this comment

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

LGTM

src/libutil/file-content-address.cc Outdated Show resolved Hide resolved
@Ericson2314 Ericson2314 merged commit 5b26c66 into NixOS:master Feb 13, 2024
8 checks passed
Comment on lines +25 to +26
default:
abort();
Copy link
Member

Choose a reason for hiding this comment

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

Coming a bit late, but is that default necessary? I thought that enum structs could do some exhaustiveness checking.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so https://gcc.gnu.org/wiki/VerboseDiagnostics#enum_switch

But @roberth dded a werror so that all variants must be mentioned even with a default:, which makes the default: less of a foot-gun.

@Ericson2314 Ericson2314 deleted the ca-type-names branch February 14, 2024 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fetching Networking with the outside (non-Nix) world, input locking new-cli Relating to the "nix" command store Issues and pull requests concerning the Nix store
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants