HomePhabricator

move-only: Extract common/args and common/config.cpp from util/system

Description

move-only: Extract common/args and common/config.cpp from util/system

Summary:
This is an extraction of ArgsManager related functions from util/system
into their own common file.

Config file related functions are moved to common/configfile.cpp.

The background of this commit is an ongoing effort to decouple the
libbitcoinkernel library from the ArgsManager. The ArgsManager belongs
into the common library, since the kernel library should not depend on
it. See doc/design/libraries.md for more information on this rationale.

This is a backport of core#27419
Depends on D16203

Note that due to missing backports, I had to make CheckValid and InterpretOption non-static and add them to args.h so that they are available both for args.cpp and configfile.cpp. These two static functions will go away when we backport core#22766

Test Plan: ninja all check-all bench-bitcoin bitcoin-fuzzers

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D16202

Details

Provenance
PiRKAuthored on May 22 2024, 10:25
PiRKPushed on May 23 2024, 07:58
Reviewer
Restricted Project
Differential Revision
D16202: move-only: Extract common/args and common/config.cpp from util/system
Parents
rABC4c05a04a597e: add missing includes and remove unneeded ones
Branches
Unknown
Tags
Unknown