зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Add naive infinite loop detection when fixing lockfile dependencies
https://github.com/rubygems/rubygems/commit/5e933968a2
This commit is contained in:
Родитель
c79d236493
Коммит
261f5d3202
|
@ -587,10 +587,18 @@ module Bundler
|
||||||
end
|
end
|
||||||
|
|
||||||
def materialize(dependencies)
|
def materialize(dependencies)
|
||||||
|
# Tracks potential endless loops trying to re-resolve.
|
||||||
|
# TODO: Remove as dead code if not reports are received in a while
|
||||||
|
incorrect_spec = nil
|
||||||
|
|
||||||
specs = begin
|
specs = begin
|
||||||
resolve.materialize(dependencies)
|
resolve.materialize(dependencies)
|
||||||
rescue IncorrectLockfileDependencies => e
|
rescue IncorrectLockfileDependencies => e
|
||||||
reresolve_without([e.spec])
|
spec = e.spec
|
||||||
|
raise "Infinite loop while fixing lockfile dependencies" if incorrect_spec == spec
|
||||||
|
|
||||||
|
incorrect_spec = spec
|
||||||
|
reresolve_without([spec])
|
||||||
retry
|
retry
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче