Move FileTransfer from libstore to libutil - #614
Draft
edolstra wants to merge 1 commit into
Draft
Conversation
FileTransfer has nothing to do with the Nix store, and having it in
libutil makes it possible to put other things that need to do
uploads/downloads (such as OpenTelemetry export) in libutil directly.
This moves filetransfer.{cc,hh}, filetransfer-impl.hh and the S3/AWS
machinery it depends on (s3-url.{cc,hh}, aws-creds.{cc,hh}) to
libutil, along with:
* the curl and aws-crt-cpp dependencies, the s3-aws-auth build option
and the NIX_WITH_AWS_AUTH macro (now in nix/util/config.hh);
* nixVersion / determinateNixVersion (used in the User-Agent header),
now in nix/util/version.hh, re-exported from nix/store/globals.hh;
* nixConfDir() / nixUserConfFiles() (used for the netrc-file default),
i.e. global-paths.hh and the NIX_CONF_DIR define;
* the curl_global_init() call, from initLibStore() to initLibUtil();
* the filetransfer-request, filetransfer-retry and s3-url unit tests,
from libstore-tests to libutil-tests.
libstore no longer links against curl or aws-crt-cpp.
Assisted-by: Claude Fable 5 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
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
FileTransfer has nothing to do with the Nix store, and having it in libutil makes it possible to put other things that need to do uploads/downloads (such as OpenTelemetry export) in libutil directly.
This moves filetransfer.{cc,hh}, filetransfer-impl.hh and the S3/AWS machinery it depends on (s3-url.{cc,hh}, aws-creds.{cc,hh}) to libutil, along with:
the curl and aws-crt-cpp dependencies, the s3-aws-auth build option and the NIX_WITH_AWS_AUTH macro (now in nix/util/config.hh);
nixVersion / determinateNixVersion (used in the User-Agent header), now in nix/util/version.hh, re-exported from nix/store/globals.hh;
nixConfDir() / nixUserConfFiles() (used for the netrc-file default), i.e. global-paths.hh and the NIX_CONF_DIR define;
the curl_global_init() call, from initLibStore() to initLibUtil();
the filetransfer-request, filetransfer-retry and s3-url unit tests, from libstore-tests to libutil-tests.
libstore no longer links against curl or aws-crt-cpp.
Assisted-by: Claude Fable 5 noreply@anthropic.com
Context