refactor: Make all #includes relative to project root (laanwj, MeshCollider, ryanofsky) #11651

pull meshcollider wants to merge 8 commits into bitcoin:master from meshcollider:201711_absolute_includes changing 370 files +2071 −2064
  1. meshcollider commented at 1:51 am on November 10, 2017: contributor

    Rebase of #11053

    Previously started by @laanwj, ACK’ed by promag, ryanofsky, jonasschnelli, and concept-ACK’ed by practicalswift and jnewbery. Thus should be almost RTM :)

  2. meshcollider commented at 1:55 am on November 10, 2017: contributor
    @ryanofsky you might want to check this over :)
  3. fanquake added the label Build system on Nov 10, 2017
  4. ryanofsky commented at 6:29 am on November 10, 2017: member
    utACK 5d0eae757e30605ec3d26bc515856b1d20a13cc2
  5. laanwj commented at 6:53 am on November 10, 2017: member
    So we’re doing this? Okay! utACK 5d0eae7
  6. sipa commented at 7:22 am on November 10, 2017: member
    Pieter was here.
  7. practicalswift commented at 9:23 am on November 10, 2017: contributor

    utACK 5d0eae757e30605ec3d26bc515856b1d20a13cc2

    Nice!

  8. MarcoFalke renamed this:
    refactor: Make all #includes relative to project root (rebased)
    refactor: Make all #includes relative to project root (laanwj, MeshCollider, ryanofsky)
    on Nov 10, 2017
  9. jnewbery commented at 5:41 pm on November 10, 2017: member
    Thanks for taking and rebasing this. Big concept ACK. Will review later.
  10. laanwj commented at 3:28 pm on November 15, 2017: member
    Needs rebase, after that please let me know and we should just merge it, has had lots of review and is a pain to keep up to date.
  11. in doc/developer-notes.md:465 in 5d0eae757e outdated
    460@@ -461,6 +461,14 @@ namespace {
    461 
    462   - *Rationale*: Avoids confusion about the namespace context
    463 
    464+- Prefer `#include <primitives/transaction.h>` bracket syntax instead of
    465+  `#include "primitives/transactions.h" quote syntax when possible.
    


    promag commented at 3:38 pm on November 15, 2017:
    Missing `.

    promag commented at 3:40 pm on November 15, 2017:
    BTW, unrelated but the Rationale above doesn’t render well. And some are missing a period.
  12. promag commented at 3:39 pm on November 15, 2017: member
    rere-utACK.
  13. 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-
    1a445343f6
  14. qt: refactor: Use absolute include paths in .ui files 5b56ec969f
  15. build: Remove -I for everything but project root
    Remove -I from build system for everything but the project root,
    and built-in dependencies.
    0c715214dd
  16. 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.
    e7b31631c7
  17. test: refactor: Use absolute include paths for test data files 138016bf92
  18. refactor: Include obj/build.h instead of build.h 96b92810a6
  19. Recommend #include<> syntax in developer notes 434f5a2506
  20. Remove trailing whitespace causing travis failure 7b91b5f8a4
  21. meshcollider commented at 7:24 pm on November 15, 2017: contributor
    Rebased and added missing tick pointed out by @promag, will just wait for travis to verify the scripted-diff again
  22. jnewbery commented at 9:22 pm on November 15, 2017: member

    Tested ACK 7b91b5f8a4417da1940956c1ab32dba94dc104e1.

    I noticed that there were a few .rc and .mm files still using the "" style includes. Should those also be changed to <> style? I think the change would be like this: https://github.com/jnewbery/bitcoin/commit/1a506c7ebf91747f40c9e408f8947e5491101422 but I don’t have windows or mac machines to test the build on.

  23. theuni commented at 9:26 pm on November 15, 2017: member
    indifferent utACK 7b91b5f8a4417da1940956c1ab32dba94dc104e1.
  24. laanwj merged this on Nov 16, 2017
  25. laanwj closed this on Nov 16, 2017

  26. laanwj referenced this in commit 3c098a8aa0 on Nov 16, 2017
  27. meshcollider deleted the branch on Nov 16, 2017
  28. laanwj commented at 11:49 am on November 16, 2017: member

    I noticed that there were a few .rc and .mm files still using the "" style includes.

    If they are correctly relative (so to include from the directory the including file is in, or even a directory relative to its directory) it’s fine to keep them. "" style includes are a problem when they’re used when <> is meant, which was common in this project before this change.

  29. MarcoFalke referenced this in commit 604e08c83c on Dec 20, 2017
  30. PastaPastaPasta referenced this in commit 2a1222eb7c on Feb 13, 2020
  31. PastaPastaPasta referenced this in commit 1bc14bb293 on Feb 13, 2020
  32. PastaPastaPasta referenced this in commit e49f06cce6 on Feb 13, 2020
  33. PastaPastaPasta referenced this in commit 1b507c42c1 on Feb 13, 2020
  34. PastaPastaPasta referenced this in commit 7ddfb73623 on Feb 29, 2020
  35. PastaPastaPasta referenced this in commit 5bee9b326a on Feb 29, 2020
  36. UdjinM6 referenced this in commit 588f34c1ff on Feb 29, 2020
  37. PastaPastaPasta referenced this in commit be7bf2e9d8 on Mar 4, 2020
  38. PastaPastaPasta referenced this in commit 4e172c89f4 on Mar 5, 2020
  39. PastaPastaPasta referenced this in commit dd98106cab on Mar 5, 2020
  40. PastaPastaPasta referenced this in commit ebca1edc3c on Mar 5, 2020
  41. PastaPastaPasta referenced this in commit b32e6aa365 on Mar 11, 2020
  42. PastaPastaPasta referenced this in commit 2877a1271d on Mar 13, 2020
  43. PastaPastaPasta referenced this in commit 72c3cede7b on Mar 14, 2020
  44. PastaPastaPasta referenced this in commit e2465497a7 on Mar 15, 2020
  45. PastaPastaPasta referenced this in commit 2bceb6d735 on Mar 15, 2020
  46. UdjinM6 referenced this in commit 8a1ec935a0 on Mar 19, 2020
  47. ckti referenced this in commit 00d5d478ae on Mar 28, 2021
  48. ckti referenced this in commit 4d14c8e786 on Mar 28, 2021
  49. gades referenced this in commit 3b8742fe1f on Jun 26, 2021
  50. gades referenced this in commit fd48b7614e on Jun 30, 2021
  51. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-18 21:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me