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

Only check circular deps when dependency api is available, not on full index sources #6919

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented Aug 25, 2023

What was the end-user or developer problem that led to this PR?

This check fixes some edge cases during resolution, but checking it when dependency APIs are not available is too slow.

What is your fix for the problem, implemented in this PR?

This PR builds on top of #6897 to disable this check.

Fixes #6828.

I tried this manually and it's back to fast but I'd probably add a spec before merging?

Make sure the following tasks are checked

# Don't bother to check for circular deps when no dependency API are
# available, since it's too slow to be usable. That edge case won't work
# but resolution other than that should work fine and reasonably fast.
if source.respond_to?(:dependency_api_available?) && source.dependency_api_available?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok. Nice. I couldn't figure out where this check belonged. I tried putting something on RemoteSpecification that would tell it not to use the source to load dependencies, but it was a bit ugly. I'll see if I can write a test for this and we can merge.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm leaving for a few weeks, so feel free to proceed as you see fit. We could close this PR, cherry-pick these two commits there, and get the issue fixed there?

@martinemde martinemde force-pushed the deivid-rodriguez/dont-check-circular-deps-on-full-index-sources branch from 19e12eb to 7ff0f97 Compare August 25, 2023 20:05
@martinemde martinemde force-pushed the deivid-rodriguez/dont-check-circular-deps-on-full-index-sources branch from 7ff0f97 to d275cdc Compare August 25, 2023 20:10
@martinemde martinemde changed the title Don't check circular deps on full index sources Only check circular deps when dependency api is available, not on full index sources Aug 25, 2023
@martinemde
Copy link
Member

the ruby-core specs are failing to install ruby because of a temporary bug. I'm going to merge this anyway since the fails are not caused by this code.

@martinemde martinemde merged commit 5f9545c into master Aug 25, 2023
90 of 92 checks passed
@martinemde martinemde deleted the deivid-rodriguez/dont-check-circular-deps-on-full-index-sources branch August 25, 2023 23:50
deivid-rodriguez pushed a commit that referenced this pull request Sep 21, 2023
…rcular-deps-on-full-index-sources

Only check circular deps when dependency api is available, not on full index sources

(cherry picked from commit 5f9545c)
deivid-rodriguez pushed a commit that referenced this pull request Sep 21, 2023
…rcular-deps-on-full-index-sources

Only check circular deps when dependency api is available, not on full index sources

(cherry picked from commit 5f9545c)
deivid-rodriguez added a commit to dependabot/dependabot-core that referenced this pull request Nov 8, 2023
* `Bundler::Fetcher#fetchers` was made private at
  rubygems/rubygems#6919.
* `Bundler::Index#search_all` returns an enumerator since
  rubygems/rubygems#6962.
deivid-rodriguez added a commit to dependabot/dependabot-core that referenced this pull request Nov 9, 2023
* `Bundler::Fetcher#fetchers` was made private at
  rubygems/rubygems#6919.
* `Bundler::Index#search_all` returns an enumerator since
  rubygems/rubygems#6962.
deivid-rodriguez added a commit to dependabot/dependabot-core that referenced this pull request Nov 15, 2023
* `Bundler::Fetcher#fetchers` was made private at
  rubygems/rubygems#6919.
* `Bundler::Index#search_all` returns an enumerator since
  rubygems/rubygems#6962.
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.

Bundler 2.4.9 increases update from 30 seconds to 1 hour when not using dependency APIs
2 participants