Page MenuHomePhabricator

Prevent shared conf files from failing with different available options in different binaries
ClosedPublic

Authored by Fabien on Jan 23 2020, 17:12.

Details

Summary
Options that are not available (but known in the source code) will
cause an error if they are specified.
Make these options "available" by adding them to the hidden options
category to prevent conf files from failing when shared between binaries
that have different options available.

Backport of core PR13441.

This required to re-add exceptions to the check-doc linter, but most
of them are going to be removed by a following diff (PR14272).

Test Plan
ninja check
./test/functional/test_runner.py
./bitcoind -help

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those Bitcoin Core PRs have been inserted into the summary for reference.

Fabien retitled this revision from Add unavailable options to hidden options category to Prevent shared conf files from failing with different available options in different binaries.Jan 24 2020, 15:50
src/init.cpp
107 ↗(On Diff #15761)

How is this list constructed?

test/lint/check-doc.py
47 ↗(On Diff #15761)

This is not needed in the original PR, why?

src/init.cpp
107 ↗(On Diff #15761)

This is the list of wallet arguments from the WalletInit::AddWalletOptions() in src/wallet/init.cpp.
This is still duplicated in Core's current master :(

test/lint/check-doc.py
47 ↗(On Diff #15761)

Core didn't remove them in PR13112, which you did during the backport (D3716), so these exceptions have always been there for them.

These args are defeating the regex because it's constructed as a list. As mentioned in the summary most of them are deprecated and will be removed in a follow-up backport, then the shorter remaining list can be converted back to use AddArg() to clean the check-doc.py exceptions if necessary.

This revision is now accepted and ready to land.Jan 27 2020, 14:21