Update Lix to latest revision #8

Open
ma27 wants to merge 2 commits from ma27/hydra:lix-update into main
Member

cc @delroth @leo60228

cc @jade who authored the related Lix change. Would be nice if you could double-check if I didn't mess anything up in e92ac734e6 :)

cc @delroth @leo60228 cc @jade who authored the related Lix change. Would be nice if you could double-check if I didn't mess anything up in e92ac734e6 :)
ma27 added 2 commits 2024-09-26 13:03:49 +00:00
Flake lock file updates:

• Updated input 'lix':
    'git+https://git.lix.systems/lix-project/lix?ref=refs/heads/main&rev=02eb07cfd539c34c080cb1baf042e5e780c1fcc2' (2024-09-01)
  → 'git+https://git.lix.systems/lix-project/lix?ref=refs/heads/main&rev=31954b51367737defbae87fba053b068897416fb' (2024-09-26)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/6e99f2a27d600612004fbd2c3282d614bfee6421' (2024-08-30)
  → 'github:NixOS/nixpkgs/759537f06e6999e141588ff1c9be7f3a5c060106' (2024-09-25)
Since ca1dc3f70bf98e2424b7b2666ee2180675b67451, the NAR parser has moved
the preallocate & receive steps into the file handle class to remove the
assumption that only one file can be handled at a time.
jade reviewed 2024-09-26 17:03:23 +00:00
jade left a comment
Owner

i mean there's really nothing wrong with this code but there's a couple things you could make a bit better

i mean there's really nothing wrong with this code but there's a couple things you could make a bit better
@ -12,0 +18,4 @@
public:
MyFileHandle(NarMemberData * memberData, uint64_t size) : memberData(memberData)
{
expectedSize = size;
Owner

should be in the initializer above rather than in the function itself

should be in the initializer above rather than in the function itself
@ -12,0 +19,4 @@
MyFileHandle(NarMemberData * memberData, uint64_t size) : memberData(memberData)
{
expectedSize = size;
hashSink = std::make_unique<HashSink>(HashType::SHA256);
Owner

does this actually have to be behind a pointer? only reason i can see that it would is being big but i don't think it's big.

edit: oh, it might be the reset() maybe? so that it becomes null and crashes if you put extra data in it?

does this actually have to be behind a pointer? only reason i can see that it would is being big but i don't think it's big. edit: oh, it might be the reset() maybe? so that it becomes null and crashes if you put extra data in it?
@ -32,2 +60,3 @@
std::unique_ptr<FileHandle> createRegularFile(const Path & path, uint64_t size, bool executable) override
{
curMember = &members.insert_or_assign(prefix + path, NarMemberData {
auto memberData = &members.insert_or_assign(prefix + path, NarMemberData {
Owner

probably should be auto * right?

or you could refactor it into being a reference now that the field doesn't need to be reassigned; either way.

probably should be `auto *` right? or you could refactor it into being a reference now that the field doesn't need to be reassigned; either way.
Author
Member

i mean there's really nothing wrong with this code but there's a couple things you could make a bit better

To be clear, that's also helpful for me!

I mostly do C++ because I'm interested in hacking on Lix & Hydra, so getting input on how to do things better is very valuable to me. Thank you!

I'll try to get back to you this weekend for that.

> i mean there's really nothing wrong with this code but there's a couple things you could make a bit better To be clear, that's also helpful for me! I mostly do C++ because I'm interested in hacking on Lix & Hydra, so getting input on how to do things better is very valuable to me. Thank you! I'll try to get back to you this weekend for that.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u lix-update:ma27-lix-update
git checkout ma27-lix-update

Merge

Merge the changes and update on Forgejo.
git checkout main
git merge --no-ff ma27-lix-update
git checkout main
git merge --ff-only ma27-lix-update
git checkout ma27-lix-update
git rebase main
git checkout main
git merge --no-ff ma27-lix-update
git checkout main
git merge --squash ma27-lix-update
git checkout main
git merge --ff-only ma27-lix-update
git checkout main
git merge ma27-lix-update
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/hydra#8
No description provided.