aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/make-content-addressed.cc
AgeCommit message (Collapse)Author
2023-07-21Merge pull request #8650 from obsidiansystems/content-address-simplerEelco Dolstra
Simplify `ContentAddress`
2023-07-07Simplify `ContentAddress`John Ericson
Whereas `ContentAddressWithReferences` is a sum type complex because different varieties support different notions of reference, and `ContentAddressMethod` is a nested enum to support that, `ContentAddress` can be a simple pair of a method and hash. `ContentAddress` does not need to be a sum type on the outside because the choice of method doesn't effect what type of hashes we can use. Co-Authored-By: Cale Gibbard <cgibbard@gmail.com>
2023-06-30makeContentAddressed: Add single path helperRobert Hensing
2023-02-28No inheritance for `TextInfo` and `FixedOutputInfo`John Ericson
2023-02-28Revert "Remove some designated initializers"John Ericson
This reverts commit ee9eb83a842eb97d0180fd9d349d30ff27fdb485.
2023-02-01Remove some designated initializersJohn Ericson
With the switch to C++20, the rules became more strict, and we can no longer initialize base classes. Make them comments instead. (BTW https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2287r1.html this offers some new syntax for this use-case. Hopefully this will be adopted and we can eventually use it.)
2023-02-01Shrink diff in one placeJohn Ericson
2023-01-30Shrink diff in two placesJohn Ericson
Stuff crept in there.
2023-01-23Don't add `StorePathDescriptor` for nowJohn Ericson
We don't need it yet, we can add it back later.
2023-01-14Make `ValidPathInfo` have plain `StorePathSet` references like beforeJohn Ericson
This change can wait for another PR.
2023-01-06Do big rename to clean up codeJohn Ericson
- `PathReferences` -> `References` - `PathReferences<StorePath>` -> `StoreReference` - `references` -> `others` - `hasSelfReference` -> `self` And get rid of silly subclassing
2023-01-06Use named field initialization for referencesJohn Ericson
2022-03-25Merge remote-tracking branch 'upstream/master' into path-infoJohn Ericson
2022-03-24Add a test for fetchClosure and 'nix store make-content-addressed'Eelco Dolstra
2022-03-24Fix makeContentAddressed() on self-referencesEelco Dolstra
LocalStore::addToStore() since 79ae9e4558cbefd743f28a5e73110c2303b03a85 expects a regular NAR hash, rather than a NAR hash modulo self-references. Fixes #6300. Also, makeContentAddressed() now rewrites the entire closure (so 'nix store make-content-addressable' no longer needs '-r'). See #6301.
2022-03-24fetchClosure: Allow a path to be rewritten to CA on the flyEelco Dolstra
The advantage is that the resulting closure doesn't need to be signed, so you don't need to configure any binary cache keys on the client.