XRPLF / rippled

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

The levelization.sh script counts as included files that are commented out #5193

Open vlntb opened 4 days ago

vlntb commented 4 days ago

Issue Description

The levelization.sh script counts as included files that are commented out. I.e.

 // #include <xrpld/app/ledger/Ledger.h>
 #include <xrpld/nodestore/detail/DatabaseNodeImp.h>
 //#include <xrpl/basics/TaggedCache.ipp>
 #include <xrpl/protocol/HashPrefix.h>

This is not very obvious and creates confusion for someone who is trying to investigate and resolve issues with dependencies.

The proposal: as a minimum, add simple checks for a single line comment//.

ximinez commented 4 days ago

So the idea is you're just commenting out the #include to test levelization, but not necessarily removing it permanently? Because if you're removing it, you should just delete it. It'll still exist in git history.

vlntb commented 3 days ago

So the idea is you're just commenting out the #include to test levelization, but not necessarily removing it permanently? Because if you're removing it, you should just delete it. It'll still exist in git history.

Yes, if I was removing it, it would not be a problem.

What caught me: I was investigating newly discovered circular dependency and wasn't sure what caused it. So I was commenting out newly added headers, trying to find the point where dependency was introduced and was running in circles because the script ignored the commented-out code.