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

[WIP] Recursive Resolver #2039

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
7 participants
@segiddins
Member

segiddins commented Apr 13, 2014

⚠️ NOT READY TO MERGE ⚠️

At the moment, this is my first shot at taking Bundler's resolver and putting it into CP. It's far from finished, and the interface needs some work, but at the moment it has two of the most basic specs passing. It's up here purely for discussion until all existing specs pass, then we can figure out what else we need it to do.

\cc @alloy @irrationalfab

#-------------------------------------------------------------------------#
def full_name
if platform == Gem::Platform::RUBY or platform.nil? then

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Use || instead of or.

@houndci-bot

houndci-bot Apr 13, 2014

Use || instead of or.

@cached_specs = {}
@specs_by_target = {}
def to_lock
if platform == Gem::Platform::RUBY or platform.nil?

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Use || instead of or.

@houndci-bot

houndci-bot Apr 13, 2014

Use || instead of or.

This comment has been minimized.

@scalessec

scalessec Apr 13, 2014

CDs)?,.6655 —
Sent from Mailbox for iPhone

On Sun, Apr 13, 2014 at 1:32 PM, Hound notifications@github.com wrote:

  • Identifies the specifications that should be installed.

  • @return [Hash{TargetDefinition => Array}] specs_by_target

  • the specifications that need to be installed grouped by target

  • definition.

  • def resolve
  •  @cached_sources  = SourcesManager.aggregate
    
  •  @cached_sets     = {}
    
  •  @cached_specs    = {}
    
  •  @specs_by_target = {}
    
  •  def to_lock
    
  •    if platform == Gem::Platform::RUBY or platform.nil?
    

    Use || instead of or.

    Reply to this email directly or view it on GitHub:
    https://github.com/CocoaPods/CocoaPods/pull/2039/files#r11565961
@scalessec

scalessec Apr 13, 2014

CDs)?,.6655 —
Sent from Mailbox for iPhone

On Sun, Apr 13, 2014 at 1:32 PM, Hound notifications@github.com wrote:

  • Identifies the specifications that should be installed.

  • @return [Hash{TargetDefinition => Array}] specs_by_target

  • the specifications that need to be installed grouped by target

  • definition.

  • def resolve
  •  @cached_sources  = SourcesManager.aggregate
    
  •  @cached_sets     = {}
    
  •  @cached_specs    = {}
    
  •  @specs_by_target = {}
    
  •  def to_lock
    
  •    if platform == Gem::Platform::RUBY or platform.nil?
    

    Use || instead of or.

    Reply to this email directly or view it on GitHub:
    https://github.com/CocoaPods/CocoaPods/pull/2039/files#r11565961
if matching_versions.empty?
# If this is a top-level Gemfile requirement
if current.required_by.empty?
if base = @base[current.name] and !base.empty?

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Use && instead of and.

@houndci-bot

houndci-bot Apr 13, 2014

Use && instead of and.

end
def search(dep)
if base = @base[dep.name] and base.any?

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Use && instead of and.

@houndci-bot

houndci-bot Apr 13, 2014

Use && instead of and.

existing = activated[current.name]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Extra blank line detected.

@houndci-bot

houndci-bot Apr 13, 2014

Extra blank line detected.

find_dependency_specs(spec, spec_dependencies, target_definition)
raise version_conflict if parent.nil? || parent.name == 'bundler'

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Extra blank line detected.

@houndci-bot

houndci-bot Apr 13, 2014

Extra blank line detected.

class Resolver
module Pod
class VersionConflict < StandardError
attr_reader :conflicts

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Use 2 (not 4) spaces for indentation.

@houndci-bot

houndci-bot Apr 13, 2014

Use 2 (not 4) spaces for indentation.

# version.
#
attr_reader :locked_dependencies
attr_reader :name, :version, :dependencies, :platform

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Use 2 (not 4) spaces for indentation.

@houndci-bot

houndci-bot Apr 13, 2014

Use 2 (not 4) spaces for indentation.

attr_reader :specs_by_target
class DepProxy
attr_reader :required_by, :__platform, :dep

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Use 2 (not 4) spaces for indentation.

@houndci-bot

houndci-bot Apr 13, 2014

Use 2 (not 4) spaces for indentation.

# @!group Resolution
def satisfies?(dependency)
@name == dependency.name && dependency.requirement.satisfied_by?(Gem::Version.new(@version))

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [100/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [100/80]

end
def __materialize__
@specification = source.specs.search(Gem::Dependency.new(name, version)).last

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [85/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [85/80]

end
def method_missing(method, *args, &blk)
raise "LazySpecification has not been materialized yet (calling :#{method} #{args.inspect})" unless @specification

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [122/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [122/80]

@specs = specs.sort_by { |s| s.name }
end
def for(dependencies, skip = [], check = false, match_current_platform = false)

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [83/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [83/80]

deps = materialized.map {|s| s.name }.uniq
materialized.map! do |s|
next s unless s.is_a?(LazySpecification)
s.source.dependency_names = deps if s.source.respond_to?(:dependency_names=)

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [84/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [84/80]

if missing_specs
missing_specs << s unless spec
else
raise GemNotFound, "Could not find #{s.full_name} in any of the sources" unless spec

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [94/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [94/80]

def merge(set)
arr = sorted.dup
set.each do |s|
next if arr.any? { |s2| s2.name == s.name && s2.version == s.version && s2.platform == s.platform }

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [107/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [107/80]

resolve(reqs, activated)
end
class State < Struct.new(:reqs, :activated, :requirement, :possibles, :depth)

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [81/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [81/80]

activated[requirement.name] = requirement
debug { " Activating: #{requirement.name} (#{requirement.version})" }
debug { requirement.required_by.map { |d| " * #{d.name} (#{d.requirement})" }.join("\n") }

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [99/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [99/80]

activated[a.name] ? 0 : @gems_size[a] ]
end
debug { "Activated:\n" + activated.values.map {|a| " #{a}" }.join("\n") }

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [82/80]
Space between { and | missing.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [82/80]
Space between { and | missing.

if existing || current.name == 'bundler'
# Force the current
if current.name == 'bundler' && !existing
existing = search(DepProxy.new(Dependency.new('bundler', VERSION), Platform::RUBY)).first

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [101/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [101/80]

# Force the current
if current.name == 'bundler' && !existing
existing = search(DepProxy.new(Dependency.new('bundler', VERSION), Platform::RUBY)).first
raise GemNotFound, %Q{Pod could not find gem "bundler" (#{VERSION})} unless existing

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [96/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [96/80]

parent = current.required_by.last
if existing.respond_to?(:required_by)
parent = handle_conflict(current, states, existing.required_by[-2]) unless other_possible?(parent, states)

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [120/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [120/80]

if existing.respond_to?(:required_by)
parent = handle_conflict(current, states, existing.required_by[-2]) unless other_possible?(parent, states)
else
parent = handle_conflict(current, states) unless other_possible?(parent, states)

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [94/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [94/80]

version = base.first.version
message = "You have requested:\n" \
" #{current.name} #{current.requirement}\n\n" \
"The bundle currently has #{current.name} locked at #{version}.\n" \

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [86/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [86/80]

"Try running `bundle update #{current.name}`"
elsif current.external_source
name = current.name
versions = @source_requirements[name][name].map { |s| s.version }

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [81/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [81/80]

elsif current.external_source
name = current.name
versions = @source_requirements[name][name].map { |s| s.version }
message = "Could not find gem '#{current}' in #{current.source}.\n"

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [84/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [84/80]

versions = @source_requirements[name][name].map { |s| s.version }
message = "Could not find gem '#{current}' in #{current.source}.\n"
if versions.any?
message << "Source contains '#{name}' at: #{versions.join(', ')}"

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [83/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [83/80]

if versions.any?
message << "Source contains '#{name}' at: #{versions.join(', ')}"
else
message << "Source does not contain any versions of '#{current}'"

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [83/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [83/80]

else
message = "Could not find gem '#{current}' "
# if @index.source_types.include?(Source::Rubygems)
# message << "in any of the gem sources listed in your Gemfile."

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [82/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [82/80]

end
def error_message
errors.inject("") do |o, (conflict, (origin, requirement))|

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Prefer single-quoted strings when you don't need string interpolation or special symbols.

@houndci-bot

houndci-bot Apr 13, 2014

Prefer single-quoted strings when you don't need string interpolation or special symbols.

o << gem_message(requirement, required_by)
# If the origin is "bundler", the conflict is us
if origin.name == "bundler"

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Prefer single-quoted strings when you don't need string interpolation or special symbols.

@houndci-bot

houndci-bot Apr 13, 2014

Prefer single-quoted strings when you don't need string interpolation or special symbols.

o << gem_message(origin, required_by)
# If the bundle wants a newer bundler than the running bundler, explain
if origin.name == "bundler" && other_bundler_required

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Prefer single-quoted strings when you don't need string interpolation or special symbols.

@houndci-bot

houndci-bot Apr 13, 2014

Prefer single-quoted strings when you don't need string interpolation or special symbols.

end
else
if ((iteration_counter % iteration_rate) == 0)
UI.message "."

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Prefer single-quoted strings when you don't need string interpolation or special symbols.

@houndci-bot

houndci-bot Apr 13, 2014

Prefer single-quoted strings when you don't need string interpolation or special symbols.

@@ -80,38 +80,37 @@ module Pod
pod 'AFQuickLookView', '= 0.1.0' # requires 'AFNetworking', '>= 0.9.0'
end
resolver = Resolver.new(config.sandbox, @podfile)
specs = resolver.resolve.values.flatten.map(&:to_s).sort

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Extra blank line detected.

@houndci-bot

houndci-bot Apr 13, 2014

Extra blank line detected.

@resolver.locked_dependencies.should == [Dependency.new('BlocksKit', '1.5.2')]
end
# it "returns the locked dependencies" do
# @resolver.locked_dependencies.should == [Dependency.new('BlocksKit', '1.5.2')]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [88/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [88/80]

target_definition = @podfile.target_definitions['Pods']
specs = @resolver.specs_by_target[target_definition]
specs.map(&:to_s).should == [
specs = Resolver.resolve(@podfile.dependencies,SourcesManager)#[target_definition]

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [90/80]
Space missing after comma.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [90/80]
Space missing after comma.

# it "it resolves specifications from external sources" do
# podspec = fixture('integration/Reachability/Reachability.podspec')
# spec = Specification.from_file(podspec)
# config.sandbox.expects(:specification).with('Reachability').returns(spec)

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [83/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [83/80]

resolver = Resolver.new(config.sandbox, @podfile)
specs = resolver.resolve.values.flatten.map(&:to_s).sort
specs = Resolver.resolve(@podfile.dependencies,SourcesManager).map(&:to_s).sort

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [87/80]
Space missing after comma.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [87/80]
Space missing after comma.

e = lambda { @resolver.resolve }.should.raise Informative
e.message.should.match(/platform .* not compatible/)
end
# it "raises once any of the dependencies does not match the platform of its podfile target" do

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [101/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [101/80]

e.message.should.match(/platform .* not compatible/)
end
# it "raises once any of the dependencies does not match the platform of its podfile target" do
# Specification.any_instance.stubs(:available_platforms).returns([Platform.new(:ios, '999')])

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [101/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [101/80]

end
# it "raises once any of the dependencies does not match the platform of its podfile target" do
# Specification.any_instance.stubs(:available_platforms).returns([Platform.new(:ios, '999')])
# e = lambda { Resolver.resolve(@podfile.dependencies, SourcesManager) }.should.raise Informative

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [105/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [105/80]

it "does not raise if all dependencies are supported by the platform of the target definition" do
lambda { @resolver.resolve }.should.not.raise
end
# it "does not raise if all dependencies are supported by the platform of the target definition" do

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [105/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [105/80]

lambda { @resolver.resolve }.should.not.raise
end
# it "does not raise if all dependencies are supported by the platform of the target definition" do
# lambda { Resolver.resolve(@podfile.dependencies, SourcesManager) }.should.not.raise

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [93/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [93/80]

it "includes all the subspecs of a specification node" do
@podfile = Podfile.new do
platform :ios
pod 'RestKit', '0.10.3'
end
resolver = Resolver.new(config.sandbox, @podfile)
resolver.resolve.values.flatten.map(&:name).sort.should == %w{
Resolver.resolve(@podfile.dependencies, SourcesManager).map(&:name).sort.should == %w{

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [94/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [94/80]

@@ -146,24 +145,22 @@ module Pod
end
end
config.sandbox.expects(:specification).with('MainSpec').returns(spec)
resolver = Resolver.new(config.sandbox, @podfile)
specs = resolver.resolve.values.flatten.map(&:name).sort
specs = Resolver.resolve(@podfile.dependencies, SourcesManager).flatten.map(&:name).sort

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [96/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [96/80]

# pod 'FileMD5Hash'
# pod 'JSONKit', :head
# end
# filemd5hash, jsonkit = Resolver.resolve(@podfile.dependencies, SourcesManager).first.sort_by(&:name)

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [110/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [110/80]

@@ -171,8 +168,7 @@ module Pod
pod 'JSONKit', "1.4"
pod 'JSONKit', "1.5pre"
end
resolver = Resolver.new(config.sandbox, podfile)
e = lambda {resolver.resolve}.should.raise Pod::Informative
e = lambda {Resolver.resolve(@podfile.dependencies, SourcesManager)}.should.raise Pod::Informative

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [106/80]
Space missing inside {.
Space missing inside }.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [106/80]
Space missing inside {.
Space missing inside }.

@@ -181,13 +177,11 @@ module Pod
platform :ios
pod 'JSONKit', "<= 1.5pre"
end
resolver = Resolver.new(config.sandbox, podfile)
version = resolver.resolve.values.flatten.first.version
version = Resolver.resolve(@podfile.dependencies, SourcesManager).flatten.first.version

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [95/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [95/80]

version.to_s.should == '1.5pre'
locked_deps = [Dependency.new('JSONKit', "= 1.4")]
resolver = Resolver.new(config.sandbox, podfile, locked_deps)
version = resolver.resolve.values.flatten.first.version
version = Resolver.resolve(@podfile.dependencies, SourcesManager, {}, locked_deps).flatten.first.version

This comment has been minimized.

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [112/80]

@houndci-bot

houndci-bot Apr 13, 2014

Line is too long. [112/80]

@orta

This comment has been minimized.

Show comment
Hide comment
@orta

orta Apr 13, 2014

Member

wow, @houndci has a lot to say
I think this is amazing.

Member

orta commented Apr 13, 2014

wow, @houndci has a lot to say
I think this is amazing.

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy Apr 13, 2014

Member

Holy moly. That @houndci.

Member

alloy commented Apr 13, 2014

Holy moly. That @houndci.

@segiddins

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Apr 13, 2014

Member

@irrationalfab what should the public interface for the resolver look like? Should it be like Bundler's or like the current CP interface?

Member

segiddins commented Apr 13, 2014

@irrationalfab what should the public interface for the resolver look like? Should it be like Bundler's or like the current CP interface?

@fabiopelosin

This comment has been minimized.

Show comment
Hide comment
@fabiopelosin

fabiopelosin Apr 13, 2014

Member

@segiddins I'm looking forward to extract the resolver, the dependency, and the version logic in a dedicated gem (which will be moved to CocoaPods organisation once ready). Everything except the resolver should be completed complete in this repo (needs some double checking).

Regarding the resolver I'm looking for a more modular interface for a Resolver based on a data provider (I would prefer to abstract the specific logic to make this component reusable regardless of the rest of the logic).

Any thoughts?

Member

fabiopelosin commented Apr 13, 2014

@segiddins I'm looking forward to extract the resolver, the dependency, and the version logic in a dedicated gem (which will be moved to CocoaPods organisation once ready). Everything except the resolver should be completed complete in this repo (needs some double checking).

Regarding the resolver I'm looking for a more modular interface for a Resolver based on a data provider (I would prefer to abstract the specific logic to make this component reusable regardless of the rest of the logic).

Any thoughts?

@segiddins

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Apr 13, 2014

Member

@irrationalfab so it sounds like you're looking for an interface that leans towards Bundler's -- its just a shame their code is practically undocumented

Member

segiddins commented Apr 13, 2014

@irrationalfab so it sounds like you're looking for an interface that leans towards Bundler's -- its just a shame their code is practically undocumented

@alloy

This comment has been minimized.

Show comment
Hide comment
@alloy

alloy Apr 15, 2014

Member

@segiddins Specifically (I think) @irrationalfab means that we should end-up with an implementation that we can share with the Bundler folks.

I think a data provider and delegate system would be nicest indeed.

Member

alloy commented Apr 15, 2014

@segiddins Specifically (I think) @irrationalfab means that we should end-up with an implementation that we can share with the Bundler folks.

I think a data provider and delegate system would be nicest indeed.

@segiddins

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Apr 26, 2014

Member

@irrationalfab the biggest hurdle (now that I've dived deeper into the code) is going to be meshing their resolve method with our notion of subspecs - my best guess as to how to solve that will be to handle sub specs specially -- essentially pinning their version to any existing version requirement for their subspec.

Member

segiddins commented Apr 26, 2014

@irrationalfab the biggest hurdle (now that I've dived deeper into the code) is going to be meshing their resolve method with our notion of subspecs - my best guess as to how to solve that will be to handle sub specs specially -- essentially pinning their version to any existing version requirement for their subspec.

@segiddins

This comment has been minimized.

Show comment
Hide comment
@segiddins

segiddins Apr 26, 2014

Member

Sorry for the torrent of comments, but I'm just throwing them up here as I run into them.
Is there any reason that Source#search only searches root specs?

Member

segiddins commented Apr 26, 2014

Sorry for the torrent of comments, but I'm just throwing them up here as I run into them.
Is there any reason that Source#search only searches root specs?

if spec = @specs[p]
dependencies[p] = []
spec.all_dependencies.each do |dep|
dependencies[p] << DepProxy.new(dep, p)

This comment has been minimized.

@kylef

kylef May 3, 2014

Contributor

Can we change p this to platform? Make's it much more readable 👍.

@kylef

kylef May 3, 2014

Contributor

Can we change p this to platform? Make's it much more readable 👍.

This comment has been minimized.

@segiddins

segiddins May 3, 2014

Member

Were nowhere near the point where I'm concerned with style yet :)
Most of this is still direct from bundler

-Samuel E. Giddins

On May 3, 2014, at 2:49 PM, Kyle Fuller notifications@github.com wrote:

In lib/cocoapods/resolver.rb:

 private
  • @!group Private helpers

  •  def __dependencies
    
  •    @dependencies ||= begin
    
  •      dependencies = Hash.new { |hash, key| hash.assoc(key)[1] }
    
  •      ALL.each do |p|
    
  •        if spec = @specs[p]
    
  •          dependencies[p] = []
    
  •          spec.all_dependencies.each do |dep|
    
  •            dependencies[p] << DepProxy.new(dep, p)
    
    Can we change p this to platform? Make's it much more readable .


Reply to this email directly or view it on GitHub.

@segiddins

segiddins May 3, 2014

Member

Were nowhere near the point where I'm concerned with style yet :)
Most of this is still direct from bundler

-Samuel E. Giddins

On May 3, 2014, at 2:49 PM, Kyle Fuller notifications@github.com wrote:

In lib/cocoapods/resolver.rb:

 private
  • @!group Private helpers

  •  def __dependencies
    
  •    @dependencies ||= begin
    
  •      dependencies = Hash.new { |hash, key| hash.assoc(key)[1] }
    
  •      ALL.each do |p|
    
  •        if spec = @specs[p]
    
  •          dependencies[p] = []
    
  •          spec.all_dependencies.each do |dep|
    
  •            dependencies[p] << DepProxy.new(dep, p)
    
    Can we change p this to platform? Make's it much more readable .


Reply to this email directly or view it on GitHub.

@segiddins segiddins closed this Jun 2, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment