Class: PodPrebuild::DependenciesGraphCacheValidator

Inherits:
AccumulatedCacheValidator show all
Defined in:
lib/cocoapods-binary-cache/cache/validator_dependencies_graph.rb

Instance Attribute Summary

Attributes inherited from BaseCacheValidator

#generated_framework_path, #pod_lockfile, #podfile, #prebuilt_lockfile, #validate_prebuilt_settings

Instance Method Summary collapse

Methods inherited from BaseCacheValidator

#changes_of_prebuilt_lockfile_vs_podfile, #incompatible_build_settings, #initialize, #read_prebuilt_build_settings, #validate_pods, #validate_with_podfile

Constructor Details

This class inherits a constructor from PodPrebuild::BaseCacheValidator

Instance Method Details

#library_evolution_supported?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/cocoapods-binary-cache/cache/validator_dependencies_graph.rb', line 16

def library_evolution_supported?
  false
end

#validate(accumulated) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'lib/cocoapods-binary-cache/cache/validator_dependencies_graph.rb', line 3

def validate(accumulated)
  return accumulated if library_evolution_supported? || @pod_lockfile.nil?

  dependencies_graph = DependenciesGraph.new(@pod_lockfile.lockfile)
  clients = dependencies_graph.get_clients(accumulated.missed.to_a)
  unless Pod::Podfile::DSL.dev_pods_enabled
    clients = clients.reject { |client| @pod_lockfile.dev_pods.keys.include?(client) }
  end

  missed = clients.map { |client| [client, "Dependencies were missed"] }.to_h
  accumulated.merge(PodPrebuild::CacheValidationResult.new(missed, Set.new))
end