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-aomi-bin-0.1.2 lib/cocoapods-lhj-bin/native/analyzer.rb
cocoapods-aomi-bin-0.1.1 lib/cocoapods-lhj-bin/native/analyzer.rb
cocoapods-aomi-bin-0.1.0 lib/cocoapods-lhj-bin/native/analyzer.rb
cocoapods-aomi-bin-0.0.8 lib/cocoapods-lhj-bin/native/analyzer.rb
cocoapods-aomi-bin-0.0.7 lib/cocoapods-lhj-bin/native/analyzer.rb
cocoapods-aomi-bin-0.0.6 lib/cocoapods-lhj-bin/native/analyzer.rb
cocoapods-aomi-bin-0.0.5 lib/cocoapods-lhj-bin/native/analyzer.rb
cocoapods-aomi-bin-0.0.4 lib/cocoapods-lhj-bin/native/analyzer.rb
cocoapods-aomi-bin-0.0.3 lib/cocoapods-lhj-bin/native/analyzer.rb
cocoapods-aomi-bin-0.0.2 lib/cocoapods-lhj-bin/native/analyzer.rb
cocoapods-lhj-bin-0.0.2 lib/cocoapods-lhj-bin/native/analyzer.rb
cocoapods-lhj-bin-0.0.1 lib/cocoapods-lhj-bin/native/analyzer.rb
cocoapods-imy-bin-0.3.1.3 lib/cocoapods-imy-bin/native/analyzer.rb
cocoapods-imy-bin-0.3.1.2 lib/cocoapods-imy-bin/native/analyzer.rb
cocoapods-imy-bin-0.3.0.11 lib/cocoapods-imy-bin/native/analyzer.rb