aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/outputs-spec.cc
AgeCommit message (Collapse)Author
2024-05-29util.hh: Delete remaining file and clean up headersTom Hubrecht
Change-Id: Ic1f68e6af658e94ef7922841dd3ad4c69551ef56
2024-05-29util.{hh,cc}: Split out strings.{hh,cc}Tom Hubrecht
Change-Id: I4f642d1046d56b5db26f1b0296ee16a0e02d444a
2024-03-04Merge pull request #9172 from tfc/bad-moveseldritch horrors
Fix/remove some bad std::moves (cherry picked from commit 8c049a9f044569ebda70231709f6f15d3073894a) Change-Id: I720273378d2506a13883acee28abd096d099b0d4
2023-08-18Fixing #7479John Ericson
Types converted: - `NixStringContextElem` - `OutputsSpec` - `ExtendedOutputsSpec` - `DerivationOutput` - `DerivationType` Existing ones mostly conforming the pattern cleaned up: - `ContentAddressMethod` - `ContentAddressWithReferences` The `DerivationGoal::derivationType` field had a bogus initialization, now caught, so I made it `std::optional`. I think #8829 can make it non-optional again because it will ensure we always have the derivation when we construct a `DerivationGoal`. See that issue (#7479) for details on the general goal. `git grep 'Raw::Raw'` indicates the two types I didn't yet convert `DerivedPath` and `BuiltPath` (and their `Single` variants) . This is because @roberth and I (can't find issue right now...) plan on reworking them somewhat, so I didn't want to churn them more just yet. Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2023-01-23Test store paths, with property testsJohn Ericson
The property test in fact found a bug: we were excluding numbers!
2023-01-18OutputSpec: Allow all valid output namesEelco Dolstra
Fixes #7624.
2023-01-17Try again to fix aarch64-linux build failureJohn Ericson
f419ab48e6394838097f158265ac3cc531ee7958 was on the right track, but there are a few more missing `raw()` calls to fix.
2023-01-12Split `OutputsSpec::merge` into `OuputsSpec::{union_, isSubsetOf}`John Ericson
Additionally get rid of the evil time we made an empty `OutputSpec::Names()`.
2023-01-11Improve tests for `OutputsSpec`John Ericson
2023-01-11Remove default constructor from `OutputsSpec`John Ericson
This forces us to be explicit. It also requires to rework how `from_json` works. A `JSON_IMPL` is added to assist with this.
2023-01-11Make it hard to construct an empty `OutputsSpec::Names`John Ericson
This should be a non-empty set, and so we don't want people doing this by accident. We remove the zero-0 constructor with a little inheritance trickery.
2023-01-11Split `OutputsSpec` and `ExtendedOutputsSpec`, use the former moreJohn Ericson
`DerivedPath::Built` and `DerivationGoal` were previously using a regular set with the convention that the empty set means all outputs. But it is easy to forget about this rule when processing those sets. Using `OutputSpec` forces us to get it right.
2023-01-11Rename `OutputPath` -> `ExtendedOutputPath`John Ericson
Do this prior to making a new more limitted `OutputPath` we will use in more places.
2023-01-11Improve `OutputsSpec` slightlyJohn Ericson
A few little changes preparing for the rest.
2023-01-10Make clear that `StorePathWithOutputs` is a deprecated typeJohn Ericson
- Add a comment - Put `OutputsSpec` in a different header (First part of #6815) - Make a few stray uses of it in new code use `DerivedPath` instead.