Skip to content

Move RestrictedStore into its own file+header#12658

Merged
mergify[bot] merged 2 commits intoNixOS:masterfrom
obsidiansystems:local-derivation-goal-hide-and-split
Mar 19, 2025
Merged

Move RestrictedStore into its own file+header#12658
mergify[bot] merged 2 commits intoNixOS:masterfrom
obsidiansystems:local-derivation-goal-hide-and-split

Conversation

@Ericson2314
Copy link
Copy Markdown
Member

@Ericson2314 Ericson2314 commented Mar 14, 2025

Motivation

Split off the RestrictedStore, as it is quite separate from building (it could be used for other purposes).

I have more things queued up for #12628 but where the approach is a bit more uncertain and up for debate. These commit and the two that I moved to #12662, in contrast, I think are exceptionally "unopinionated" changes that are good no matter what approach we take.

Context

Progress on #12628


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 Mar 14, 2025
@roberth
Copy link
Copy Markdown
Member

roberth commented Mar 14, 2025

First commit: trivial move to superclass with rationale ✔️
Second commit: trivial moves + adding trivial makeLocalDerivationGoal functions. ✔️
Third commit: can't confirm trivial move with --color-moved --ignore-all-space. LGTM on the surface of it.

@L-as
Copy link
Copy Markdown
Member

L-as commented Mar 14, 2025

I like the second commit a lot.

We should definitely have much much less stuff in header files, especially where we’re using abstract classes anyway.

LGTM.

@Ericson2314 Ericson2314 changed the title Local derivation goal hide implementation and split out header Move RestrictedStore into its own file+header Mar 16, 2025
@Ericson2314
Copy link
Copy Markdown
Member Author

This is now just the last commit, since @roberth approved the previous 2.

Perhaps more significantly, it no longer knows about
`LocalDerivationGoal`, and without any effort it also compiles on
Windows just fine. (`local-derivation-goal.{cc,hh}` is currently skipped
on Windows.)
Even when the type is not currently declared in a header, I still consider this a
more future-proof style.
@Ericson2314 Ericson2314 force-pushed the local-derivation-goal-hide-and-split branch from 34b7751 to 5283589 Compare March 17, 2025 15:02
@Mic92
Copy link
Copy Markdown
Member

Mic92 commented Mar 19, 2025

@mergify queue

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 19, 2025

queue

✅ The pull request has been merged automatically

Details

The pull request has been merged automatically at d10f948

mergify bot added a commit that referenced this pull request Mar 19, 2025
mergify bot added a commit that referenced this pull request Mar 19, 2025
mergify bot added a commit that referenced this pull request Mar 19, 2025
@mergify mergify bot merged commit d10f948 into NixOS:master Mar 19, 2025
13 checks passed
@Ericson2314 Ericson2314 deleted the local-derivation-goal-hide-and-split branch March 19, 2025 14:40
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.

5 participants