-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Fixes and improvements to scripts for working with cyclic dependencies #20513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
9b5068d to
4317575
Compare
59138be to
c820cc0
Compare
tstein
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It took me an hour to review this and I'm still not clear on what the new behavior is. We should not merge this until the code and comments are clear enough that reading it in one pass leaves you with a truthy understanding of the build order computation.
(I think it's a mistake to keep hacking on this without stepping back to think about how this code should be and how your changes get us closer. Not trying to block, because I think it's possible to get this to a state where it's better to merge it than not, but then we should have that conversation right after this.)
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
3dab149 to
d46835f
Compare
6b39ff1 to
5890600
Compare
TomJo2000
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work Max.
c45965f to
c7976ec
Compare
TomJo2000
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This review is only pertaining to commit c7976ec.
This is pretty much unreviewable.
843 lines changed in a single commit is one hell of a lot to ask.
The specific pieces I have commented on in this review are by no means exhaustive, but I do not have 2-3 hours to review one commit.
I may be coming back to this later and do more incremental review,
but the amount of nesting in the code makes it exceedingly difficult to follow.
Please consider inverting some of the deeply nested conditionals into guard clauses so they can be mentally discarded after they are passed.
fa6bcc3 to
45fe9d9
Compare
Perhaps some local functions could be created in some places, but is it worth it to make the code more readable? It is worth noting that the commit highlights a large number of changed lines due to new conditions added to large algorithms (but in essence they did not change that much) for the correct operation of the collector. |
45fe9d9 to
322dac0
Compare
7ad01c9 to
e15fbc2
Compare
e15fbc2 to
c7e8924
Compare
c216b1e to
51c089d
Compare
983529b to
aa62023
Compare
aa62023 to
06db9f9
Compare
scripts/buildorder.py: - the algorithm of the function `generate_full_buildorder` has been changed, now it can work with cyclic dependencies - added new flag `-l` and function `get_list_cyclic_dependencies` which allows to find cyclic dependencies - for subpackages a new variable `depend_on_parent` has been added which allows disabling dependencies on the parent package (controlled via the variable `TERMUX_SUBPKG_DEPEND_ON_PARENT`) - updated logic of variable `only_installing`, now package dependency (with this variable) from variable `pkg_deps` will be used - added the ability to control the `only_installing` variable for subpackages via the `TERMUX_SUBPKG_DEPEND_ON_PARENT` variable - updated logic of the `recursive_dependencies` function, now only dependencies of the requested package will be returned during non-fast build scripts/build/termux_step_get_dependencies.sh: - removed `-s` flag when compiling dependencies to fix cyclic dependencies - fixed running of `termux_download_repo_file` function when cyclic dependencies are detected build-package.sh: the algorithm that launches the signing key settings has been changed, now it will be launched if the value from the `TERMUX_REPO_PACKAGE` variable and from `TERMUX_APP_PACKAGE` match build-all.sh: removed default `-s` flag when compiling packages and added check for compiled packages
Virtual packages are packages that are compiled and installed into the system, but are not assembled into a source package for package managers. One advantage of virtual packages is that they can use sources (including values from configured variables) from regular packages. This will allow us to easily create special virtual packages that will have to resolve cyclic dependencies in regular packages. [no ci]
06db9f9 to
da8a4c2
Compare
close #20338 - it is not possible to compile all packages using
build-all.shbecausebuildorder.pycannot create build orders with circular dependencies.There is also a solution to part of problem #20500:
There are also minor changes, all details are in the commit.
CC @tstein @TomJo2000