Skip to content

Comments

refactor(libstore): extract getCompressionMethod() in HttpBinaryCacheStore#14335

Merged
xokdvium merged 1 commit intoNixOS:masterfrom
lovesegfault:extract-getcompressionmethod
Oct 23, 2025
Merged

refactor(libstore): extract getCompressionMethod() in HttpBinaryCacheStore#14335
xokdvium merged 1 commit intoNixOS:masterfrom
lovesegfault:extract-getcompressionmethod

Conversation

@lovesegfault
Copy link
Member

Motivation

Extract the path-based compression method determination logic into a
protected method that returns std::optional<std::string>. This allows
subclasses to reuse the logic and makes the semantics clearer (nullopt
means no compression, not empty string).

This prepares for S3BinaryCacheStore to apply the same compression
rules when implementing multipart uploads.

Context

Part-Of: #14330


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 Oct 23, 2025
@lovesegfault lovesegfault requested a review from xokdvium October 23, 2025 03:54
…Store

Extract the path-based compression method determination logic into a
protected method that returns std::optional<std::string>. This allows
subclasses to reuse the logic and makes the semantics clearer (nullopt
means no compression, not empty string).

This prepares for S3BinaryCacheStore to apply the same compression
rules when implementing multipart uploads.
@lovesegfault lovesegfault force-pushed the extract-getcompressionmethod branch from 2bcc439 to b047cec Compare October 23, 2025 05:03

protected:

std::optional<std::string> getCompressionMethod(const std::string & path)
Copy link
Contributor

Choose a reason for hiding this comment

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

In the future this could just become an enum for content encoding.

@xokdvium xokdvium added this pull request to the merge queue Oct 23, 2025
Merged via the queue into NixOS:master with commit 5d7912e Oct 23, 2025
16 checks passed
@lovesegfault lovesegfault deleted the extract-getcompressionmethod branch October 23, 2025 09:16
@edolstra edolstra mentioned this pull request Dec 9, 2025
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.

3 participants