Skip to content
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

[RFC] non-recursive check to break build-check cycles #54633

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tornaria
Copy link
Contributor

@tornaria tornaria commented Mar 9, 2025

  • shutils/build_dependencies.sh: non-recursive check
  • python3-referencing: check circular dep
  • python3-jsonschema-specifications: bump to test check cycle
  • python3-jsonschema: bump to test check cycle

There's too many build-check cycles and handling them is complicated
when updating simultaneously a few interdependent packages.

This PR makes it so enabling check on a package will not affect dependencies
that are built in the process.

For CI and for xbulk, this means that some packages could be built more than
once (at most twice) but every package will be checked exactly one time. But
only if there is a build-check cycle, since otherwise sort-dependencies will
find a good build order that avoids it.

@classabbyamp classabbyamp added the xbps-src xbps-src related label Mar 9, 2025
@tornaria
Copy link
Contributor Author

tornaria commented Mar 9, 2025

I thought this would be more complicated, but it seems just unsetting XBPS_CHECK_PKGS when recursing into building dependencies does the trick. In the test case the situation here is

  • python3-jsonschema depends on python3-jsonschema-specifications
  • python3-jsonschema-specifications depends on python3-referencing
  • python3-referencing checkdepends on python3-jsonschema
    When CI runs common/travis/build.sh it results in the following steps:
  • build python3-referencing
  • bulid python3-jsonschema-specifications
  • build python3-jsonschema
  • bulid-and-check python3-referencing
  • build-and-check python3-jsonschema-specifications
  • build-and-check python3-jsonschema
    So this is worst case and everything gets build twice and checked once.

If it is undesired to change the way -Q and -K currently work, an alternative may be adding a new option and then use, say, XBPS_CHECK_PKGS=nonrecurse or something like that, and then we break the recursion only in this case.

A middle ground is to make -Q non-recursive and -K recursive (I think this makes sense since -Q is for "quick" afaik, and CI already uses -Q).

@tornaria tornaria marked this pull request as ready for review March 9, 2025 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
xbps-src xbps-src related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants