scripted-diff: stop using the gArgs wrappers #10607

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
7 participants
Contributor

benma commented Jun 15, 2017

Following #9494, where they were introduced to ease the transition.

The first commit removes the uses, the second commit removes the wrappers themselves.

Contributor

practicalswift commented Jun 16, 2017

utACK 39faab7

Owner

sipa commented Jun 16, 2017

utACK 39faab7

Contributor

fanquake commented Jun 28, 2017

Concept ACK. Needs rebase.

Member

jnewbery commented Jul 10, 2017

Tested ACK 39faab7

Contributor

benma commented Jul 13, 2017

Rebased.

Contributor

TheBlueMatt commented Jul 14, 2017

Wait, is this the direction we want to go in, or the opposite? eg i figured we'd want to slowly move towards storing references to gArgs in things that need them, eg as we move towards classes which contain things (CConnman, CChainState, etc) we'd either pass in the options relevant to those objects (ala CConnman's constructor) or pass them the gArgs to avoid the global.

Contributor

benma commented Jul 14, 2017

@TheBlueMatt what you mention makes sense to me, but it seems unrelated to this PR, which is just about removing the wrappers (which use the same global). This PR is also good prep-work for storing references to gArgs in classes in that sense.

Contributor

TheBlueMatt commented Jul 14, 2017

Hmm, I figured it'd be easier to just sed/gArgs/locallyReferencedArgs/ in files, but I guess it doesnt matter much either way.

Contributor

benma commented Jul 14, 2017 edited

One can easily do this after this PR, whereas before, gArgs didn't even appear in all the places you'd expect it to and you'd have to use the same kind of complex regexp to catch them all as in the scripted diff script. I agree it doesn't matter much, but it does make it easier I think.

It could be a long time too until someone starts doing this work, and in the meantime, we can avoid the confusion of how to use it, saving review cycles/time.

Contributor

practicalswift commented Jul 17, 2017

Needs rebase :-)

Contributor

benma commented Jul 17, 2017

Rebased 😆

benma added some commits Jul 22, 2017

@benma benma scripted-diff: stop using the gArgs wrappers
They were temporary additions to ease the transition.

-BEGIN VERIFY SCRIPT-
find src/ -name "*.cpp" ! -wholename "src/util.h" ! -wholename "src/util.cpp" | xargs perl -i -pe 's/(?<!\.)(ParseParameters|ReadConfigFile|IsArgSet|(Soft|Force)?(Get|Set)(|Bool|)Arg(s)?)\(/gArgs.\1(/g'
-END VERIFY SCRIPT-
728eac6
@benma benma remove unused gArgs wrappers 1fe1ae9
Contributor

benma commented Jul 22, 2017

Rebased.

@sipa I'd be glad if this could be merged soon, as it conflicts with other changes very often.

Contributor

benma commented Jul 23, 2017

How can I retrigger CI?

Owner

sipa commented Jul 23, 2017

@benma I've restarted Travis.

laanwj added this to the 0.15.0 milestone Jul 28, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment