Closed thejohnfreeman closed 3 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 71.3%. Comparing base (
c706926
) to head (714bee1
).:exclamation: Current head 714bee1 differs from pull request most recent head 7cf4611
Please upload reports for the commit 7cf4611 to get more accurate results.
Note, this is moving files from impl
and details
to their parent directories, which I think is a problem because that expands the libxrpl
API surface with the following files (which were designed to be implementation and not API)
json/impl/json_assert.h
protocol/impl/STVar.h protocol/impl/b58_utils.h protocol/impl/secp256k1.h protocol/impl/token_errors.h
resource/impl/Entry.h resource/impl/Import.h resource/impl/Key.h resource/impl/Kind.h resource/impl/Logic.h resource/impl/Tuning.h
server/impl/BaseHTTPPeer.h server/impl/BaseWSPeer.h server/impl/JSONRPCUtil.h server/impl/PlainHTTPPeer.h server/impl/SSLHTTPPeer.h server/impl/ServerImpl.h
server/impl/BasePeer.h server/impl/Door.h server/impl/LowestLayer.h server/impl/PlainWSPeer.h server/impl/SSLWSPeer.h server/impl/io_list.h
Note, this is moving files from
impl
anddetails
to their parent directories, which I think is a problem because that expands thelibxrpl
API surface with the following files (which were designed to be implementation and not API)json/impl/json_assert.h protocol/impl/STVar.h protocol/impl/b58_utils.h protocol/impl/secp256k1.h protocol/impl/token_errors.h resource/impl/Entry.h resource/impl/Import.h resource/impl/Key.h resource/impl/Kind.h resource/impl/Logic.h resource/impl/Tuning.h server/impl/BaseHTTPPeer.h server/impl/BaseWSPeer.h server/impl/JSONRPCUtil.h server/impl/PlainHTTPPeer.h server/impl/SSLHTTPPeer.h server/impl/ServerImpl.h server/impl/BasePeer.h server/impl/Door.h server/impl/LowestLayer.h server/impl/PlainWSPeer.h server/impl/SSLWSPeer.h server/impl/io_list.h
@thejohnfreeman thanks for addressing this concern.
I noticed that the most recent rebase has reverted the change to which I refer here #4997 (comment)
Thanks @thejohnfreeman , I see that's fixed now.
I'm trying to follow the directions for merging an in-process branch with the physical restructure. Everything was going well until I ran bin/physical.sh
. There I had two surprises.
The output from bin/physical.sh
was this:
move protocol buffers
move libxrpl headers
move libxrpl sources
check leftovers
leftover files:
beast//utility/src/beast_PropertyStream.cpp crypto//impl/secure_erase.cpp
The leftover files was a surprise, and the instructions did not say what to do if that happened, so I'm reporting it here.
Additionally, I checked the sort order of Builds/levelization/results/ordering.txt
as instructed. To my surprise it contained no lines that started with either xrpl.
or xrpld
. All 229 lines in the file started with either ripple.
or test.
. So I suspect something went wrong.
Suggestions? Thanks.
@scottschurr what branch did you try?
@thejohnfreeman, this is the branch I tried: https://github.com/scottschurr/rippled/tree/blocked-book
I just merged that branch without a hitch: https://github.com/thejohnfreeman/rippled/tree/blocked-book
I'll try to replicate your experience on macOS soon.
Thanks. And if there are any experiments you would like me to try I'm happy to do so. Best of luck.
The problem is what I expected, the environment. The requirements I found missing on macOS are:
sed
find
readarray
)clang-format-10
must be on the PATH
Can you run the script in a Linux environment? Alternatively, if you can get these programs on your PATH
(brew install gnu-sed findutils
will install gsed
and gfind
; Homebrew doesn't have clang-format-10
) and invoke the script with Bash (the default shell in macOS is now Zsh), then it should work.
I don't have a readily available Linux environment, but I can install gsed
and gfind
using homebrew and invoke the script with Bash. I'm in the middle of a different (unrelated) problem right now, but I should be able to get you results in a day or so. Thanks for the help.
I just checked my Mac for the versions of some of the utilities the conversion script uses:
$ awk --version
awk version 20200816
$ bash --version
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin21)
Copyright (C) 2007 Free Software Foundation, Inc.
$ what /usr/bin/find
/usr/bin/find
PROGRAM:find PROJECT:shell_cmds-240.100.15
PROGRAM:find PROJECT:shell_cmds-240.100.15
$ what /usr/bin/sed
/usr/bin/sed
PROGRAM:sed PROJECT:text_cmds-138.100.3
PROGRAM:sed PROJECT:text_cmds-138.100.3
It sounds like the version of bash
is just not gonna work with your script. I'm less sure about the others. Thoughts?
On my Mac, I installed Bash from Homebrew. It has version 5.2. Mac's versions of find
and sed
come from FreeBSD (to my knowledge) with version strings that are inscrutable to me. The awk
may be compatible.
As a reminder, I'm willing to manually merge anyone's in-progress branch on demand. They just need to resolve the conflicts up to whatever commit precedes the merge of this PR.
This is the final and most disruptive phase of the physical redesign. It makes these changes:
cmake/
directory.include/xrpl/
.src/libxrpl/
.src/xrpld/
.ripple
C++ namespace is unchanged.xrpl/
andripple/
subdirectories of the header installation prefix. (ripple/
is a symbolic link toxrpl/
, even on Windows.) They include each other with path prefixxrpl/
, but existing projects can continue to include them with path prefixripple/
and migrate to prefixxrpl/
at their own pace.rippled
andxrpld
. (xrpld
is a symbolic link torippled
, even on Windows.)There is a non-trivial (but, I think, easy) process to merge existing branches-in-progress with this one. I will describe it here. Look at the sequence of commits. Notice the commit with subject "Add bin/physical.sh". Call that the checkpoint commit. There are no file movements before the checkpoint commit. The four commits following the checkpoint commit are generated by running the
bin/physical.sh
script added in the checkpoint commit.When you want to merge, you should:
develop
. Resolve conflicts yourself. Be sure that all of the source files added in your branch (if any) appear in the correct source lists inBuilds/CMake/RippledCore.cmake
, between theBEGIN
/END
marker comments (example) . The restructure script moves only the files in these lists, and stops early if any files are leftover (because they were omitted from the lists). Remember the commit ID of this merge. Call it your marker commit.bin/physical.sh
, passing it your marker commit from the first step:Builds/levelization/results/ordering.txt
. Lines beginning withxrpl.
must appear before lines beginning withxrpld
. Different versions ofsort
have been inconsistent on this matter in my experience. On my machine,sort
putsxrpl.
afterxrpld
, which does not match the output ofsort
in our CI job that checks the file.Then you can
git merge -X ours $upstream
whereupstream
points to the head of this branch. It will automatically resolve conflicts in your branch's favor. Then you cangit diff $upstream
and see your work ported.This PR requires the same finishing steps as #4966:
develop
. The commit sequence that predates the review should be preserved. Fixes made since the review opened should be merged into earlier commits..git-blame-ignore-revs
.