Skip to content

Conversation

@ken2812221
Copy link
Contributor

Concept from #12744, but without parsing negated options.

src/util.h Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for this method to start with a lower case letter while all other start with upper case letters?

Copy link
Contributor Author

@ken2812221 ken2812221 Jun 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No reason. So make it uppercase.

src/util.cpp Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use cbegin() and cend() please.

Copy link
Contributor Author

@ken2812221 ken2812221 Jun 16, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made it range-based

src/util.cpp Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: can use std::make_pair(name, value) for simplicity.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

emplace_back is more simple.

@qmma70
Copy link
Contributor

qmma70 commented Jun 16, 2018

I'm utAck on this. Nicely done.

This could have also been implemented with regex, but the pattern is simple enough that the logic is easily understandable.

@Empact
Copy link
Contributor

Empact commented Jun 17, 2018

Concept ACK - maybe include the tests from #12744?

@ken2812221
Copy link
Contributor Author

@Empact Those tests have been added by #12713

@ken2812221
Copy link
Contributor Author

Current on master, if there are some options in the config file without =, they would cause an exception. In this PR, I simply ignore them, or should I also throw an exception?

@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 19, 2018

Note to reviewers: This pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@DrahtBot DrahtBot mentioned this pull request Jun 19, 2018
Copy link

@jezzalladmins jezzalladmins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run

@DrahtBot
Copy link
Contributor

Needs rebase

@maflcko
Copy link
Member

maflcko commented Jun 24, 2018

Update doc/build-unix.md as well?

@ken2812221
Copy link
Contributor Author

@MarcoFalke Sure

src/util.cpp Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding style nit: use braces whenever indenting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

src/util.cpp Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

src/util.cpp Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe introduce a static constant for this set of trimmable characters?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is what you want.

src/util.cpp Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can just be a static function; it doesn't need to be a method of ArgsManager.

@ken2812221 ken2812221 closed this Jul 18, 2018
@sipa
Copy link
Member

sipa commented Jul 18, 2018

Why close?

@ken2812221
Copy link
Contributor Author

Sorry, misclicked

@ken2812221 ken2812221 reopened this Jul 18, 2018
@fanquake fanquake added this to the 0.17.0 milestone Jul 18, 2018
@sipa
Copy link
Member

sipa commented Jul 19, 2018

utACK f447a0a

@@ -1,108 +0,0 @@
# ============================================================================
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this file-bloodbath.

@laanwj
Copy link
Member

laanwj commented Jul 20, 2018

+42 −123 even though this is removing an external dependency, if that isn't a clear indication that this should be done I don't know what is.
utACK f447a0a

@laanwj laanwj merged commit f447a0a into bitcoin:master Jul 20, 2018
laanwj added a commit that referenced this pull request Jul 20, 2018
f447a0a Remove program options from build system (Chun Kuan Lee)
11588c6 Replace boost program_options (Chun Kuan Lee)

Pull request description:

  Concept from #12744, but without parsing negated options.

Tree-SHA512: 7f418744bb8934e313d77a5f162633746ef5d043de802b9c9cd9f7c1842e7e566eb5f171cd9e2cc13317281b2449c6fbd553fa4f09b837e6af2f5d2b2aabdca2
@ken2812221 ken2812221 deleted the program_options branch July 20, 2018 14:51
laanwj added a commit that referenced this pull request Nov 12, 2018
0385109 Add test for rpcpassword hash error (MeshCollider)
13fe258 Error if rpcpassword in conf contains a hash character (MeshCollider)

Pull request description:

  Fixes #13143 now #13482 was merged

Tree-SHA512: e7d00c8df1657f6b8d0eee1e06b9ce2b1b0a2de487377699382c1b057836e1571dac313ca878b5877c862f0461ba789a50b239d2a9f34accd8a6321f126e3d2a
furszy added a commit to PIVX-Project/PIVX that referenced this pull request Apr 30, 2021
be6563a Remove program options from build systems (Fuzzbawls)
025b8c2 Replace boost program_options (Fuzzbawls)

Pull request description:

  Follow-up to #2324 which backports bitcoin#13482

  This removes the dependency on Boost's program_options module

ACKs for top commit:
  random-zebra:
    utACK be6563a
  furszy:
    utACK be6563a and merging

Tree-SHA512: 6b1550e20c0bb6b3ec16659b181724cf72f02c7c00b584bdfabe06b77feeea249910e073393775f47499dfa0a7fb9137d952e8ad9f78df0ff03cc9b5a8e1c96b
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Jul 1, 2021
f447a0a Remove program options from build system (Chun Kuan Lee)
11588c6 Replace boost program_options (Chun Kuan Lee)

Pull request description:

  Concept from bitcoin#12744, but without parsing negated options.

Tree-SHA512: 7f418744bb8934e313d77a5f162633746ef5d043de802b9c9cd9f7c1842e7e566eb5f171cd9e2cc13317281b2449c6fbd553fa4f09b837e6af2f5d2b2aabdca2
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Jul 2, 2021
f447a0a Remove program options from build system (Chun Kuan Lee)
11588c6 Replace boost program_options (Chun Kuan Lee)

Pull request description:

  Concept from bitcoin#12744, but without parsing negated options.

Tree-SHA512: 7f418744bb8934e313d77a5f162633746ef5d043de802b9c9cd9f7c1842e7e566eb5f171cd9e2cc13317281b2449c6fbd553fa4f09b837e6af2f5d2b2aabdca2
knst pushed a commit to knst/dash that referenced this pull request Aug 16, 2021
0385109 Add test for rpcpassword hash error (MeshCollider)
13fe258 Error if rpcpassword in conf contains a hash character (MeshCollider)

Pull request description:

  Fixes bitcoin#13143 now bitcoin#13482 was merged

Tree-SHA512: e7d00c8df1657f6b8d0eee1e06b9ce2b1b0a2de487377699382c1b057836e1571dac313ca878b5877c862f0461ba789a50b239d2a9f34accd8a6321f126e3d2a
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Aug 23, 2021
0385109 Add test for rpcpassword hash error (MeshCollider)
13fe258 Error if rpcpassword in conf contains a hash character (MeshCollider)

Pull request description:

  Fixes bitcoin#13143 now bitcoin#13482 was merged

Tree-SHA512: e7d00c8df1657f6b8d0eee1e06b9ce2b1b0a2de487377699382c1b057836e1571dac313ca878b5877c862f0461ba789a50b239d2a9f34accd8a6321f126e3d2a
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants