-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store parsed hashes in DerivationOutput
#3439
Store parsed hashes in DerivationOutput
#3439
Conversation
652f6a5
to
ffcaf7a
Compare
DerivationOutput
DerivationOutput
I had to add a bit more machinery to the C++ side Rust FFI to make this tick. Hopefully that makes it...no less safe than before :D. |
I think the Rust code will cause double frees, as writing into a pointer will also drop the value contained in it. You probably want to replace it with a |
@puckipedia good catch! I wast thinking |
ae98bbb
to
8ee0242
Compare
Oh, I guess whatever compiler was being used on Darwin couldn't |
97dad5c
to
a56a3cf
Compare
a56a3cf
to
96cac09
Compare
Do idiomatic C++ copy and move constructors for a few things, so wrapping structs' defaults can work.
b674e10
to
3ad4f8f
Compare
It's best to detect invalid data as soon as possible, with data types that make storing it impossible.
3ad4f8f
to
832bd53
Compare
DerivationOutput
DerivationOutput
-- contains #3450 and #3455
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
…into no-stringly-typed-derivation-output
…ingly-typed-derivation-output
DerivationOutput
-- contains #3450 and #3455DerivationOutput
-- contains #3450
DerivationOutput
-- contains #3450DerivationOutput
…-derivation-output
OK! No more spooky FFI changes needed. |
@@ -838,6 +839,9 @@ std::optional<ValidPathInfo> decodeValidPathInfo( | |||
std::istream & str, | |||
bool hashGiven = false); | |||
|
|||
/* Compute the prefix to the hash algorithm which indicates how the files were | |||
ingested. */ | |||
std::string makeFileIngestionPrefix(const FileIngestionMethod m); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong indentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, actually this is just a freestanding function and the closing brace is the namespace (so no indent). I guess in the later PR it gets a better home in content-address.h
.
…-derivation-output
OK! I think I got all of the comments, and CI has turned green. |
It's best to detect invalid data as soon as possible, with data types
that make storing it impossible.