Skip to content

Conversation

@PastaPastaPasta
Copy link
Member

Contains bitcoin#10286, which will be dropped once PR9 is merged

@UdjinM6
Copy link

UdjinM6 commented Mar 1, 2020

scripted-diff: Replace #include "" with #include <> (ryanofsky) 64a79b0 is broken - should remove leading whitespaces in the title. Also missing 37580b0 and 1c0acbe from #3353 (which should be dropped on rebase later) to fix the included 10286.

@UdjinM6
Copy link

UdjinM6 commented Mar 5, 2020

Needs rebase

@UdjinM6 UdjinM6 added this to the 16 milestone Mar 5, 2020
@PastaPastaPasta PastaPastaPasta force-pushed the backport-11651 branch 3 times, most recently from 2b1984b to 5640d42 Compare March 11, 2020 14:14
@PastaPastaPasta
Copy link
Member Author

force pushed, I think I fixed the problem with the scripted diff

@UdjinM6
Copy link

UdjinM6 commented Mar 14, 2020

Looks like 8d15df8 is incomplete, changes in quite a few files are missing a83e72a (which is why scripted-diff fails).

@PastaPastaPasta
Copy link
Member Author

fixed 8d15df8 and forcepushed

@PastaPastaPasta
Copy link
Member Author

Alrighty... Building + tests passing locally, plus scripted diffs verify locally

For some reason, I wasn't able to figure it out, the changes done in bitcoin@138016b resulted in an empty commit, so that commit has been dropped

@PastaPastaPasta
Copy link
Member Author

@UdjinM6
Copy link

UdjinM6 commented Mar 15, 2020

Changes from the commit you dropped as well as changes to .moc files and other generated-on-compile files should NOT go into scripted-diff and should be applied in a separate commit.

@PastaPastaPasta
Copy link
Member Author

I don't see any .moc files being changed in either of the scripted diffs. The scripted diff commit was created by running the script, followed by git add *.h git add *.cpp

@UdjinM6
Copy link

UdjinM6 commented Mar 15, 2020

Oh, sorry, I mean changes mentioning those files, not changes to them.

EDIT: to clarify the reason why: those files simply do not exist until you start compiling so script can't process their names/paths properly.

@PastaPastaPasta
Copy link
Member Author

So... Why did those changes occur when executing the script??

@UdjinM6
Copy link

UdjinM6 commented Mar 15, 2020

Because you are running the script in a non-clean folder? Do make clean before running the script and it should give you the right set of changes.

PastaPastaPasta and others added 11 commits March 15, 2020 10:20
-BEGIN VERIFY SCRIPT-
for f in \
  src/*.cpp \
  src/*.h \
  src/bench/*.cpp \
  src/bench/*.h \
  src/compat/*.cpp \
  src/compat/*.h \
  src/consensus/*.cpp \
  src/consensus/*.h \
  src/crypto/*.cpp \
  src/crypto/*.h \
  src/crypto/ctaes/*.h \
  src/policy/*.cpp \
  src/policy/*.h \
  src/primitives/*.cpp \
  src/primitives/*.h \
  src/qt/*.cpp \
  src/qt/*.h \
  src/qt/test/*.cpp \
  src/qt/test/*.h \
  src/rpc/*.cpp \
  src/rpc/*.h \
  src/script/*.cpp \
  src/script/*.h \
  src/support/*.cpp \
  src/support/*.h \
  src/support/allocators/*.h \
  src/test/*.cpp \
  src/test/*.h \
  src/wallet/*.cpp \
  src/wallet/*.h \
  src/wallet/test/*.cpp \
  src/wallet/test/*.h \
  src/zmq/*.cpp \
  src/zmq/*.h
do
  base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-

Signed-off-by: Pasta <[email protected]>
-BEGIN VERIFY SCRIPT-
for f in \
  src/bls/*.cpp \
  src/bls/*.h \
  src/evo/*.cpp \
  src/evo/*.h \
  src/governance/*.cpp \
  src/governance/*.h \
  src/llmq/*.cpp \
  src/llmq/*.h \
  src/masternode/*.cpp \
  src/masternode/*.h \
  src/privatesend/*.cpp \
  src/privatesend/*.h
do
  base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-

Signed-off-by: Pasta <[email protected]>
Remove -I from build system for everything but the project root,
and built-in dependencies.

Signed-off-by: Pasta <[email protected]>

# Conflicts:
#	src/Makefile.test.include
This makes all include paths in the GUI absolute.

Many changes are involved as every single source file in
src/qt/ assumes to be able to use relative includes.

Signed-off-by: Pasta <[email protected]>

# Conflicts:
#	src/qt/dash.cpp
#	src/qt/optionsmodel.cpp
#	src/qt/test/rpcnestedtests.cpp
Signed-off-by: Pasta <[email protected]>
Signed-off-by: pasta <[email protected]>
@PastaPastaPasta
Copy link
Member Author

Alrighty. Created a new branch backport-11651-t which started out as develop, I ran make clean then executed the upstream script and created the scripted diff commit, then did the same for the dash scripted diff. Then I cherry-picked all of the other commits from backport-11651 then I cherrypicked test: refactor: Use absolute include paths for test data files which was dropped from backport-11651 and resolved conflicts. Then I cherry-picked the remaining commits from backport-11651. Then I checked-out backport-11651 then git reset --hard backport-11651-t. Scripted diffs pass locally

I haven't build it locally yet (depends is messed up so I'm building that rn) but I have no reason to believe it wont build

@UdjinM6
Copy link

UdjinM6 commented Mar 15, 2020

Nice, both scripted diffs have "ok" status on gitlab too 👍 Need (at least) a couple more fixes now it seems, pls see bbe6779a11e61ef8c545f4a8a7cc79a4032de6d0, 9ff4164281f3af3f9410168f130cd335135b0983, 65cc460e65f9450d1f826c03c1e70ba59f7d9055

@PastaPastaPasta
Copy link
Member Author

cherry-picked

@PastaPastaPasta
Copy link
Member Author

Gitlab passing

Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK

@PastaPastaPasta
Copy link
Member Author

Merge?

@UdjinM6 UdjinM6 merged commit 8a1ec93 into dashpay:develop Mar 19, 2020
@PastaPastaPasta PastaPastaPasta deleted the backport-11651 branch March 19, 2020 23:39
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Jun 26, 2021
* scripted-diff: Replace #include "" with #include <> (ryanofsky)

-BEGIN VERIFY SCRIPT-
for f in \
  src/*.cpp \
  src/*.h \
  src/bench/*.cpp \
  src/bench/*.h \
  src/compat/*.cpp \
  src/compat/*.h \
  src/consensus/*.cpp \
  src/consensus/*.h \
  src/crypto/*.cpp \
  src/crypto/*.h \
  src/crypto/ctaes/*.h \
  src/policy/*.cpp \
  src/policy/*.h \
  src/primitives/*.cpp \
  src/primitives/*.h \
  src/qt/*.cpp \
  src/qt/*.h \
  src/qt/test/*.cpp \
  src/qt/test/*.h \
  src/rpc/*.cpp \
  src/rpc/*.h \
  src/script/*.cpp \
  src/script/*.h \
  src/support/*.cpp \
  src/support/*.h \
  src/support/allocators/*.h \
  src/test/*.cpp \
  src/test/*.h \
  src/wallet/*.cpp \
  src/wallet/*.h \
  src/wallet/test/*.cpp \
  src/wallet/test/*.h \
  src/zmq/*.cpp \
  src/zmq/*.h
do
  base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-

Signed-off-by: Pasta <[email protected]>

* scripted-diff: Replace #include "" with #include <> (Dash Specific)

-BEGIN VERIFY SCRIPT-
for f in \
  src/bls/*.cpp \
  src/bls/*.h \
  src/evo/*.cpp \
  src/evo/*.h \
  src/governance/*.cpp \
  src/governance/*.h \
  src/llmq/*.cpp \
  src/llmq/*.h \
  src/masternode/*.cpp \
  src/masternode/*.h \
  src/privatesend/*.cpp \
  src/privatesend/*.h
do
  base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-

Signed-off-by: Pasta <[email protected]>

* build: Remove -I for everything but project root

Remove -I from build system for everything but the project root,
and built-in dependencies.

Signed-off-by: Pasta <[email protected]>

* qt: refactor: Use absolute include paths in .ui files

* qt: refactor: Changes to make include paths absolute

This makes all include paths in the GUI absolute.

Many changes are involved as every single source file in
src/qt/ assumes to be able to use relative includes.

Signed-off-by: Pasta <[email protected]>

* test: refactor: Use absolute include paths for test data files

* Recommend #include<> syntax in developer notes

* refactor: Include obj/build.h instead of build.h

* END BACKPORT bitcoin#11651 Remove trailing whitespace causing travis failure

* fix backport 11651

Signed-off-by: Pasta <[email protected]>

* More of 11651

* fix blockchain.cpp

Signed-off-by: pasta <[email protected]>

* Add missing "qt/" in includes

* Add missing "test/" in includes

* Fix trailing whitespaces

Co-authored-by: Wladimir J. van der Laan <[email protected]>
Co-authored-by: Russell Yanofsky <[email protected]>
Co-authored-by: MeshCollider <[email protected]>
Co-authored-by: UdjinM6 <[email protected]>
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Feb 14, 2022
* scripted-diff: Replace #include "" with #include <> (ryanofsky)

-BEGIN VERIFY SCRIPT-
for f in \
  src/*.cpp \
  src/*.h \
  src/bench/*.cpp \
  src/bench/*.h \
  src/compat/*.cpp \
  src/compat/*.h \
  src/consensus/*.cpp \
  src/consensus/*.h \
  src/crypto/*.cpp \
  src/crypto/*.h \
  src/crypto/ctaes/*.h \
  src/policy/*.cpp \
  src/policy/*.h \
  src/primitives/*.cpp \
  src/primitives/*.h \
  src/qt/*.cpp \
  src/qt/*.h \
  src/qt/test/*.cpp \
  src/qt/test/*.h \
  src/rpc/*.cpp \
  src/rpc/*.h \
  src/script/*.cpp \
  src/script/*.h \
  src/support/*.cpp \
  src/support/*.h \
  src/support/allocators/*.h \
  src/test/*.cpp \
  src/test/*.h \
  src/wallet/*.cpp \
  src/wallet/*.h \
  src/wallet/test/*.cpp \
  src/wallet/test/*.h \
  src/zmq/*.cpp \
  src/zmq/*.h
do
  base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-

Signed-off-by: Pasta <[email protected]>

* scripted-diff: Replace #include "" with #include <> (Dash Specific)

-BEGIN VERIFY SCRIPT-
for f in \
  src/bls/*.cpp \
  src/bls/*.h \
  src/evo/*.cpp \
  src/evo/*.h \
  src/governance/*.cpp \
  src/governance/*.h \
  src/llmq/*.cpp \
  src/llmq/*.h \
  src/masternode/*.cpp \
  src/masternode/*.h \
  src/privatesend/*.cpp \
  src/privatesend/*.h
do
  base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f
done
-END VERIFY SCRIPT-

Signed-off-by: Pasta <[email protected]>

* build: Remove -I for everything but project root

Remove -I from build system for everything but the project root,
and built-in dependencies.

Signed-off-by: Pasta <[email protected]>

* qt: refactor: Use absolute include paths in .ui files

* qt: refactor: Changes to make include paths absolute

This makes all include paths in the GUI absolute.

Many changes are involved as every single source file in
src/qt/ assumes to be able to use relative includes.

Signed-off-by: Pasta <[email protected]>

* test: refactor: Use absolute include paths for test data files

* Recommend #include<> syntax in developer notes

* refactor: Include obj/build.h instead of build.h

* END BACKPORT bitcoin#11651 Remove trailing whitespace causing travis failure

* fix backport 11651

Signed-off-by: Pasta <[email protected]>

* More of 11651

* fix blockchain.cpp

Signed-off-by: pasta <[email protected]>

* Add missing "qt/" in includes

* Add missing "test/" in includes

* Fix trailing whitespaces

Co-authored-by: Wladimir J. van der Laan <[email protected]>
Co-authored-by: Russell Yanofsky <[email protected]>
Co-authored-by: MeshCollider <[email protected]>
Co-authored-by: UdjinM6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants