XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.51k stars 1.46k forks source link

Physical redesign #4606

Open thejohnfreeman opened 1 year ago

thejohnfreeman commented 1 year ago

There are several changes I'd like to see made to our physical source layout:

[^1]: Eventually it should be renamed to xrpl, to further draw the line of separation between the XRPL and Ripple. [^2]: Which should eventually be renamed to src/xrpld for the same reason. [^3]: The rest of the Builds/ directory should eventually disappear: container code should move to a separate project like rippled-docker; levelization code should be obviated by good physical design; and the rest is likely bit-rotted, unused for several years, and should just be deleted.

These recommendations are based on my research into project structure, looking at standardization attempts, major projects, and build system conventions and defaults. The result of these changes will look something like this:

/
|- conanfile.py
|- CMakeLists.txt
|- cmake/
|- external/
|  |- ed25519-donna/
|  |- secp256k1/
|  |- snappy/
|  `- soci/
|- include/
|  `- ripple/
`- src/
   |- libxrpl/
   |- xrpld/
   `- tests/

These changes are pretty easy to implement, taking maybe two days, but will have a very large "who moved my cheese?" effect. It will be more disruptive than the formatting commit from a few years ago. I think the best way to make it happen is with a script that makes all the changes (file moves and include fixes). Run that script on the develop branch and push the result as commit C. Let developers merge their work-in-progress branch with parent(C), run the script, commit the result, and then merge with C.

See related: #4593

thejohnfreeman commented 1 year ago

Moving this discussion elsewhere. Leaving the issue open just to indicate it is an open problem.

thejohnfreeman commented 1 year ago

Some things I've run into while working on the script: