mamba-org / powerloader

BSD 3-Clause "New" or "Revised" License
15 stars 9 forks source link

Rewrite the interface of `Target` for encapsulation. #124

Closed Klaim closed 2 years ago

Klaim commented 2 years ago

Limiting direct access to the members of Target lead to a lot of discoveries about the organisation of Downloader and zck data and functions, which is why this commit is quite bigger than initially expected. 😬 Some code have been moved from Downloader to Target member functions as they are mainly manipulating the state of Target without much changes to Downloader, which basically is a sign that it's code related to Target.

This is really just side effects of trying to make the Target interface more contained. Because a lot of other code was manipulating it's internals directly, it ended up touching a lot of code. Where possible I tried to keep the order and meaning of the code when I had to move it around.

More info and discoveries (to help lead the related PRs that will come soon):

All this will probably participate to complications in evolving libpowerloader, but we are in a good position and time to improve the situation. :)

Klaim commented 2 years ago

Looks like the python tests are "blocking" somewhere in test/test_other.py. I'm reviewing to check which code changed order or meaning compared to main branch.