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

Api based dependency check #51

Merged
merged 39 commits into from
Jan 3, 2024
Merged

Conversation

finestructure
Copy link
Member

@finestructure finestructure commented Dec 30, 2023

This updates our dependency check to use the API to collect all dependencies instead of crawling each package. It brings down total runtime of this part of the nightly job from 8.5 hours to 5-6 minutes.

If run as is, it finds 60 new packages, but I've also added a parameter to limit the additions per nightly run. We could set this to, say, --limit 10 such that these 60 new packages would be added over the course of 6 days. The idea is to have some sort of limit in place so we don't have too many new packages in one go hitting the build system. (Although 60 isn't really unmanageable either.)

Two bigger questions are the following:

  1. In the original dependency check, we skipped packages that had no products. I've dropped this, because it's not a check we apply to packages that are added manually either.

  2. We also ignore packages that are forks. If we dropped this constraint, we'd add another ~160 packages. We may want to consider dropping this constraint, too, to ensure our coverage of packages and all their dependencies is as complete as possible. However, we may want to review how we're displaying and ranking forked packages before we add lots of them.

    I don't think we have any check in place to ignore when packages are added manually, so the main reason to do this is the large influx of forks we'd add.

This whole change in backwards compatible in that it adds a new command check-dependencies2 without removing the old one. So this PR is safe to merge and only once we merge SwiftPackageIndex/PackageList#6057 will it take effect.

@cla-bot cla-bot bot added the cla-signed label Dec 30, 2023
@finestructure finestructure marked this pull request as ready for review January 3, 2024 12:34
@finestructure finestructure merged commit 86a4efe into main Jan 3, 2024
3 checks passed
@finestructure finestructure deleted the api-based-dependency-check branch January 3, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants