Remove DepProxy patch, as Bundler::DepProxy is removed in Bundler 2.4.0 (#15269)

This commit is contained in:
Rob Bavey 2023-08-21 15:54:01 -04:00 committed by GitHub
parent afc50eb676
commit fe1b1ed1da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -125,7 +125,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)
@ -203,14 +202,6 @@ task :generate_plugins_version do
end
end
end
DepProxy.class_eval do
# 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