Move worker_proto defs out of remote-store.cc to own file#8360
Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom May 17, 2023
Merged
Move worker_proto defs out of remote-store.cc to own file#8360Ericson2314 merged 1 commit intoNixOS:masterfrom
worker_proto defs out of remote-store.cc to own file#8360Ericson2314 merged 1 commit intoNixOS:masterfrom
Conversation
7 tasks
fricklerhandwerk
approved these changes
May 17, 2023
These items are not templates, and they declared in `worker-protocol.hh`; therefore they should live in a `worker-protocol.cc`. Anything else needlessly diverges from convention. After all, it is not like this code is only used in `remote-store.cc`; it is also used in `daemon.cc`. There is no good reason to place it with the client implementation or the server implementation when it used equally by both.
75aaaea to
904878d
Compare
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
These items are not templates, and they declared in
worker-protocol.hh; therefore they should live in aworker-protocol.cc.Anything else needlessly diverges from convention. After all, it is not like this code is only used in
remote-store.cc; it is also used indaemon.cc. There is no good reason to place it with the client implementation or the server implementation when it used equally by both.(No code is changed, just code is moved. One can use
git diff --color-movedto verify.)Context
This came from #6223; I do understand that PR is still WIP and not yet idea-approved from the team as a whole, but prep commits like this I think should avoid the controversial downsides.
Moving things into better locations might seem trivial, but it will help me avoid conflicts on #6223 which is very useful to me. Even if that PR doesn't happen, per the motivation above (which is careful not to mention #6233, and just talk about this change in isolation) I think it is still net-positive.
Checklist for maintainers
Maintainers: tick if completed or explain if not relevant
tests/**.shsrc/*/teststests/nixos/*Priorities
Add 👍 to pull requests you find important.