pixi
pixi copied to clipboard
refactor: factor gateway data fetch and solve into a function
A follow-up on https://github.com/prefix-dev/pixi/pull/1767
Progress report is not the best, as messages such as fetching repodata for environment can end up being displayed a fair few times. Is there a way to make this better?
Progress report is not the best, as messages such as
fetching repodata for environmentcan end up being displayed a fair few times. Is there a way to make this better?
Yes but it requires implementing a Reporter.
@baszalmstra I am not sure what this entails. But it does not sound straightforward 🥲 . Is it worth it? Or should we pull the messaging out of the function and wrap it when / it needed where it is used?
Yeah that sounds fair! 👍
Yeah that sounds fair! 👍
Actually that does not work. Even with the messaging outside of the loop, the iterator is still there waiting... Reporter it is then :-)
Rattler-build has a custom implementation here: https://github.com/prefix-dev/rattler-build/blob/a28628bc6d29e227dffc1a64c27fa5f0b50f7dc9/src/render/solver.rs#L136
Its not great but might serve as inspiration!
Hi guys! What is the status of this PR @olivier-lacroix @baszalmstra?
Most of this PR has become irrelevant, due to numerous changes to pixi global. I have just kept a simple refactor of repodata_gateway function and reset the rest.
Note: not sure a trait is really needed to encapsulate that method?