Sha256: c5ab5b7d79aea671d66235065e6f3e886a26548cddc96600c2e17132608f3c52

Contents?: true

Size: 1.44 KB

Versions: 155

Compression:

Stored size: 1.44 KB

Contents


require 'parallel'
require 'cocoapods'

module Pod
  class Installer
    class Analyzer
      # > 1.6.0
      # all_specs[dep.name] 为 nil 会崩溃
      # 主要原因是 all_specs 分析错误
      # 查看 source 是否正确
      #
      # def dependencies_for_specs(specs, platform, all_specs)
      #   return [] if specs.empty? || all_specs.empty?

      #   dependent_specs = Set.new

      #   specs.each do |s|
      #     s.dependencies(platform).each do |dep|
      #       all_specs[dep.name].each do |spec|
      #         dependent_specs << spec
      #       end
      #     end
      #   end

      #   dependent_specs - specs
      # end

      # > 1.5.3 版本
      # rewrite update_repositories
      #
      alias old_update_repositories update_repositories
      def update_repositories
        if installation_options.update_source_with_multi_processes
          # 并发更新私有源
          # 这里多线程会导致 pod update 额外输出 --verbose 的内容
          # 不知道为什么?
          Parallel.each(sources.uniq(&:url), in_processes: 4) do |source|
            if source.git?
              config.sources_manager.update(source.name, true)
            else
              UI.message "Skipping `#{source.name}` update because the repository is not a git source repository."
            end
          end
          @specs_updated = true
        else
          old_update_repositories
        end
      end


    end
  end
end

Version data entries

155 entries across 155 versions & 8 rubygems

Version Path
cocoapods-bb-bin-0.2.9.0 lib/cocoapods-bb-bin/native/analyzer.rb
cocoapods-swordfish-1.0.2 lib/swordfish/native/analyzer.rb
cocoapods-bb-bin-0.2.8.1 lib/cocoapods-bb-bin/native/analyzer.rb
cocoapods-bb-bin-0.2.8 lib/cocoapods-bb-bin/native/analyzer.rb
cocoapods-fy-bin-0.3.1 lib/cocoapods-fy-bin/native/analyzer.rb
cocoapods-tdf-bin-0.0.43 lib/cocoapods-tdf-bin/native/analyzer.rb
cocoapods-bb-bin-0.2.7.13 lib/cocoapods-bb-bin/native/analyzer.rb
cocoapods-imy-bin-0.3.1.21 lib/cocoapods-imy-bin/native/analyzer.rb
cocoapods-bb-bin-0.2.7.12 lib/cocoapods-bb-bin/native/analyzer.rb
cocoapods-bb-bin-0.2.7.11 lib/cocoapods-bb-bin/native/analyzer.rb
cocoapods-bb-bin-0.2.7.10 lib/cocoapods-bb-bin/native/analyzer.rb
cocoapods-tdf-bin-0.0.42 lib/cocoapods-tdf-bin/native/analyzer.rb
cocoapods-bb-bin-0.2.7.9 lib/cocoapods-bb-bin/native/analyzer.rb
cocoapods-bb-bin-0.2.7.8 lib/cocoapods-bb-bin/native/analyzer.rb
cocoapods-tdf-bin-0.0.41 lib/cocoapods-tdf-bin/native/analyzer.rb
cocoapods-bb-bin-0.2.7.7 lib/cocoapods-bb-bin/native/analyzer.rb
cocoapods-bb-bin-0.2.7.6 lib/cocoapods-bb-bin/native/analyzer.rb
cocoapods-fy-bin-0.3.0 lib/cocoapods-fy-bin/native/analyzer.rb
cocoapods-bb-bin-0.2.7.5 lib/cocoapods-bb-bin/native/analyzer.rb
cocoapods-tdf-bin-0.0.40 lib/cocoapods-tdf-bin/native/analyzer.rb