mamba-org / mamba

The Fast Cross-Platform Package Manager
https://mamba.readthedocs.io
BSD 3-Clause "New" or "Revised" License
6.79k stars 348 forks source link

maint: Remove `PrefixData::load` #3318

Closed jjerphan closed 3 months ago

jjerphan commented 3 months ago

Merge its content within PrefixData::PrefixData.

Hind-M commented 3 months ago

We should remove this as well.

jjerphan commented 3 months ago

Yes, I probably should have kept this PR in Draft.

There's the same pattern with SubdirData:

https://github.com/mamba-org/mamba/blob/3e1e97b0e6e49cac042cff7396fbbe5e71a63a9f/libmamba/src/core/subdirdata.cpp#L594

Hind-M commented 3 months ago

IMHO, I think we should keep them all, since it's kind of separating the logic and it's easier to read (better that blocks of code at once). And it's not like it's defined somewhere far away in the codebase or in another file... It's just the method right below...

jjerphan commented 3 months ago

PrefixData::load only was called once in the constructor, in that case I think it would have made sense to merge it to prevent any misuse. No strong opinion.

Do you propose reverting the merge commit?

Hind-M commented 3 months ago

No strong opinion either, I was just expressing mine ^^

Do you propose reverting the merge commit?

Either that or removing the leftover in the header. But for SubdirData, I would keep it the way it is.

jjerphan commented 3 months ago

I just have opened https://github.com/mamba-org/mamba/pull/3325.