Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions rakelib/plugins_docs_dependencies.rake
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ class PluginVersionWorking
end

def try_plugin(plugin, successful_dependencies)
Bundler::DepProxy.__clear!
builder = Bundler::Dsl.new
gemfile = LogStash::Gemfile.new(File.new(LogStash::Environment::GEMFILE_PATH, "r+")).load
gemfile.update(plugin)
Expand Down Expand Up @@ -204,14 +203,6 @@ task :generate_plugins_version do
end
end
end
DepProxy.class_eval do
Copy link
Contributor

Choose a reason for hiding this comment

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

Removing this sounds it consumes alot memory now. Do we need to find alternative solution or need to scale up the machine we are running on?

Copy link
Contributor

Choose a reason for hiding this comment

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

@mashhurs I think it is ok. As per @jsvd description on the PR:

since https://github.com/rubygems/rubygems/pull/5698 Bundler no longer has a DepProxy class, so we can remove the tweaks for it.

Then it sounds like this no longer exists, and not needed.

# Bundler caches it's dep-proxy objects (which contain Gem::Dependency objects) from all resolutions.
# The Hash itself continues to grow between dependency resolutions and hold up a lot of memory, to avoid
# the issue we expose a way of clear-ing the cached objects before each plugin resolution.
def self.__clear!
@proxies.clear
end
end

Fetcher::CompactIndex.class_eval do
alias_method :__bundle_worker, :bundle_worker
Expand Down