Replies: 2 comments
-
Sounds good to me. A lot of what we have now is ad-hoc, whatever anyone came up that works code. If you actually know a right way to do something, it's probably an improvement =) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for the proposal and +1, but maybe let's merge #2132 first. It's wasn't that far from done when I last worked on it 2 weeks ago. It's mostly find&replace in the code + fixing tests. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Proposed refactoring or deprecation
Python 3.9 added graphlib, which has a topological sorter, this seems ideal for buildall. Combined with asyncio runs & dataclasses, this might be a really nice refactor of the buildall script?
Motivation & pitch
I think this would simplify the code. It's possible that something (like forced rebuilds) could affect it, but I think it would work. I think building the dependency graph would be easier and less coupled. A
noarch: python
could also be added (separately from this) to indicate packages that just need a download and no build required. My hope is that this would get rid of the "unbuild_dependencies" parts there currently and make splitting build and runtime dependencies easier (#2132), etc.Example
Dummy implementation; this just sleeps based on deps (example 0), priority (example 1), or how many dependencies are present (example 2), uses 4 workers.
Minimal example:
Simple example:
Package example:
Non async version (might need locks)
Something like this likely will eventually be possible with asyncio, but they had to add PEP 654 first.
Beta Was this translation helpful? Give feedback.
All reactions