aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/outputs-spec.hh
AgeCommit message (Collapse)Author
2023-08-25Introduce `OutputName` and `OutputNameView` type aliasesJohn Ericson
Hopefully they make the code easier to understand!
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-03-31Ensure all headers have `#pragma once` and are in API docsJohn Ericson
`///@file` makes them show up in the internal API dos. A tiny few were missing `#pragma once`.
2023-03-29Convert a bunch of comments in headers to Doxygen documentationJohn Ericson
The internal API docs now contain more useful information. Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
2023-01-12Assert on construction that `OutputsSpec::Names` is non-emptyJohn Ericson
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.