cocoapods-binary-cache 0.1.2 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cocoapods-binary-cache/cache/validation_result.rb +4 -0
  3. data/lib/cocoapods-binary-cache/cache/validator.rb +2 -3
  4. data/lib/cocoapods-binary-cache/cache/validator_base.rb +28 -8
  5. data/lib/cocoapods-binary-cache/cache/validator_dependencies_graph.rb +7 -2
  6. data/lib/cocoapods-binary-cache/cache/validator_dev_pods.rb +21 -13
  7. data/lib/cocoapods-binary-cache/cache/validator_non_dev_pods.rb +1 -1
  8. data/lib/cocoapods-binary-cache/dependencies_graph/dependencies_graph.rb +20 -25
  9. data/lib/cocoapods-binary-cache/dependencies_graph/graph_visualizer.rb +29 -38
  10. data/lib/cocoapods-binary-cache/diagnosis/base.rb +13 -0
  11. data/lib/cocoapods-binary-cache/diagnosis/diagnosis.rb +24 -0
  12. data/lib/cocoapods-binary-cache/diagnosis/integration.rb +23 -0
  13. data/lib/cocoapods-binary-cache/env.rb +32 -0
  14. data/lib/cocoapods-binary-cache/helper/checksum.rb +10 -4
  15. data/lib/cocoapods-binary-cache/helper/lockfile.rb +26 -3
  16. data/lib/cocoapods-binary-cache/helper/podspec.rb +5 -1
  17. data/lib/cocoapods-binary-cache/helper/prebuild_order.rb +12 -0
  18. data/lib/cocoapods-binary-cache/hooks/post_install.rb +20 -2
  19. data/lib/cocoapods-binary-cache/hooks/pre_install.rb +14 -44
  20. data/lib/cocoapods-binary-cache/main.rb +2 -1
  21. data/lib/cocoapods-binary-cache/pod-binary/helper/build.rb +40 -0
  22. data/lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/installer.rb +2 -2
  23. data/lib/cocoapods-binary-cache/pod-binary/helper/detected_prebuilt_pods/target_definition.rb +3 -10
  24. data/lib/cocoapods-binary-cache/pod-binary/helper/names.rb +2 -11
  25. data/lib/cocoapods-binary-cache/pod-binary/helper/prebuild_sandbox.rb +15 -15
  26. data/lib/cocoapods-binary-cache/pod-binary/helper/target_checker.rb +7 -10
  27. data/lib/cocoapods-binary-cache/pod-binary/integration.rb +1 -3
  28. data/lib/cocoapods-binary-cache/pod-binary/integration/alter_specs.rb +4 -1
  29. data/lib/cocoapods-binary-cache/pod-binary/integration/patch/embed_framework_script.rb +1 -1
  30. data/lib/cocoapods-binary-cache/pod-binary/integration/patch/resolve_dependencies.rb +0 -3
  31. data/lib/cocoapods-binary-cache/pod-binary/integration/patch/sandbox_analyzer_state.rb +29 -0
  32. data/lib/cocoapods-binary-cache/pod-binary/integration/patch/source_installation.rb +6 -3
  33. data/lib/cocoapods-binary-cache/pod-binary/integration/source_installer.rb +42 -50
  34. data/lib/cocoapods-binary-cache/pod-binary/prebuild.rb +45 -110
  35. data/lib/cocoapods-binary-cache/pod-binary/prebuild_dsl.rb +2 -61
  36. data/lib/cocoapods-binary-cache/pod-binary/prebuild_hook.rb +0 -1
  37. data/lib/cocoapods-binary-cache/pod-rome/xcodebuild_command.rb +192 -0
  38. data/lib/cocoapods-binary-cache/pod-rome/xcodebuild_raw.rb +43 -0
  39. data/lib/cocoapods-binary-cache/prebuild_output/metadata.rb +16 -0
  40. data/lib/cocoapods-binary-cache/prebuild_output/output.rb +12 -39
  41. data/lib/cocoapods-binary-cache/scheme_editor.rb +17 -16
  42. data/lib/cocoapods-binary-cache/state_store.rb +16 -6
  43. data/lib/command/binary.rb +21 -2
  44. data/lib/command/config.rb +173 -10
  45. data/lib/command/executor/base.rb +7 -0
  46. data/lib/command/executor/fetcher.rb +4 -4
  47. data/lib/command/executor/prebuilder.rb +2 -2
  48. data/lib/command/executor/pusher.rb +1 -1
  49. data/lib/command/executor/visualizer.rb +3 -2
  50. data/lib/command/fetch.rb +0 -1
  51. data/lib/command/prebuild.rb +14 -2
  52. data/lib/command/push.rb +22 -0
  53. metadata +15 -11
  54. data/lib/cocoapods-binary-cache/pod-binary/helper/feature_switches.rb +0 -90
  55. data/lib/cocoapods-binary-cache/pod-binary/helper/passer.rb +0 -25
  56. data/lib/cocoapods-binary-cache/pod-binary/integration/remove_target_files.rb +0 -29
  57. data/lib/cocoapods-binary-cache/pod-binary/tool/tool.rb +0 -12
  58. data/lib/cocoapods-binary-cache/pod-rome/build_framework.rb +0 -247
  59. data/lib/cocoapods-binary-cache/prebuild_cache.rb +0 -49
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f1e025f0f15030692b54a837f0570f8407e19b83a073f8aa39f3f0a7e37fa49
4
- data.tar.gz: 68a219a8f46e33712e4471295ba767e4cf523152a060d1bf4ada279096803eb4
3
+ metadata.gz: 939a85addd611d4a4bcd2b9ce1eeb7e036d58a937a14bdd4f772a6c8170e4394
4
+ data.tar.gz: 0372d8f94f6e486259669f4db5431585a08645c1a23ad363258581fc5f679eff
5
5
  SHA512:
6
- metadata.gz: d64cfaed327ace3fb95372be38dff97ec3ea059eb97d64053e2c7b213efb71c53b77f27d8ed38e1d7521f7992dede01d73ad670f86cfd7928e4ca4bc41f7b4d0
7
- data.tar.gz: 3895ac6b33beabfe3d78210b76712b68096852886e527882e68100888b322404b35399b21211dc02d38192d35d2038784bbc67e4e869814fc2ab0547813ef760
6
+ metadata.gz: aa2bbc570dc6a1f462a85286578b8dc41a7ce189df2017177d083a70df9ac0d026c8ca8dea310eee2ae5b517b3418004045b8bcc782aa0440f755d8bab1dd0d4
7
+ data.tar.gz: c98e55ae66d034897db4969bf9c12b0386a69a5139bc78ada10298875c5a9487d499852bb77195ffca42f11b0d2ab97fad940348da90d21296f6f0d6952b64af
@@ -7,6 +7,10 @@ module PodPrebuild
7
7
  @hit = hit.to_set - missed_with_reasons.keys
8
8
  end
9
9
 
10
+ def all
11
+ (hit + missed).to_set
12
+ end
13
+
10
14
  def missed
11
15
  @missed_with_reasons.keys.to_set
12
16
  end
@@ -1,12 +1,11 @@
1
1
  module PodPrebuild
2
- class CacheValidator < BaseCacheValidator
2
+ class CacheValidator
3
3
  def initialize(options)
4
- super(options)
5
4
  @validators = [
6
5
  PodPrebuild::PodfileChangesCacheValidator.new(options),
7
6
  PodPrebuild::NonDevPodsCacheValidator.new(options)
8
7
  ]
9
- @validators << PodPrebuild::DevPodsCacheValidator.new(options) if Pod::Podfile::DSL.dev_pods_enabled
8
+ @validators << PodPrebuild::DevPodsCacheValidator.new(options) if PodPrebuild.config.dev_pods_enabled?
10
9
  @validators << PodPrebuild::DependenciesGraphCacheValidator.new(options)
11
10
  @validators << PodPrebuild::ExclusionCacheValidator.new(options)
12
11
  end
@@ -37,6 +37,7 @@ module PodPrebuild
37
37
  hit = Set.new
38
38
 
39
39
  check_pod = lambda do |name|
40
+ root_name = name.split("/")[0]
40
41
  version = pods[name]
41
42
  prebuilt_version = prebuilt_pods[name]
42
43
  result = false
@@ -44,13 +45,15 @@ module PodPrebuild
44
45
  missed[name] = "Not available (#{version})"
45
46
  elsif prebuilt_version != version
46
47
  missed[name] = "Outdated: (prebuilt: #{prebuilt_version}) vs (#{version})"
48
+ elsif load_metadata(root_name).blank?
49
+ missed[name] = "Metadata not available (probably #{root_name}.zip is not in GeneratedFrameworks)"
47
50
  else
48
- settings_diff = incompatible_build_settings(name)
49
- if settings_diff.empty?
51
+ diff = incompatible_pod(root_name)
52
+ if diff.empty?
50
53
  hit << name
51
54
  result = true
52
55
  else
53
- missed[name] = "Incompatible build settings: #{settings_diff}"
56
+ missed[name] = "Incompatible: #{diff}"
54
57
  end
55
58
  end
56
59
  result
@@ -70,11 +73,10 @@ module PodPrebuild
70
73
  PodPrebuild::CacheValidationResult.new(missed, hit)
71
74
  end
72
75
 
73
- def read_prebuilt_build_settings(name)
74
- return {} if generated_framework_path.nil?
75
-
76
- metadata = PodPrebuild::Metadata.in_dir(generated_framework_path + name)
77
- metadata.build_settings
76
+ def incompatible_pod(name)
77
+ # Pod incompatibility is a universal concept. Generally, it requires build settings compatibility.
78
+ # For more checks, do override this function to define what it means by `incompatible`.
79
+ incompatible_build_settings(name)
78
80
  end
79
81
 
80
82
  def incompatible_build_settings(name)
@@ -88,5 +90,23 @@ module PodPrebuild
88
90
  end
89
91
  settings_diff
90
92
  end
93
+
94
+ def load_metadata(name)
95
+ @metadata_cache ||= {}
96
+ cache = @metadata_cache[name]
97
+ return cache unless cache.nil?
98
+
99
+ metadata = PodPrebuild::Metadata.in_dir(generated_framework_path + name)
100
+ @metadata_cache[name] = metadata
101
+ metadata
102
+ end
103
+
104
+ def read_prebuilt_build_settings(name)
105
+ load_metadata(name).build_settings
106
+ end
107
+
108
+ def read_source_hash(name)
109
+ load_metadata(name).source_hash
110
+ end
91
111
  end
92
112
  end
@@ -1,11 +1,16 @@
1
1
  module PodPrebuild
2
2
  class DependenciesGraphCacheValidator < AccumulatedCacheValidator
3
+ def initialize(options)
4
+ super(options)
5
+ @ignored_pods = options[:ignored_pods] || Set.new
6
+ end
7
+
3
8
  def validate(accumulated)
4
9
  return accumulated if library_evolution_supported? || @pod_lockfile.nil?
5
10
 
6
11
  dependencies_graph = DependenciesGraph.new(@pod_lockfile.lockfile)
7
- clients = dependencies_graph.get_clients(accumulated.missed.to_a)
8
- unless Pod::Podfile::DSL.dev_pods_enabled
12
+ clients = dependencies_graph.get_clients(accumulated.discard(@ignored_pods).missed.to_a)
13
+ unless PodPrebuild.config.dev_pods_enabled?
9
14
  clients = clients.reject { |client| @pod_lockfile.dev_pods.keys.include?(client) }
10
15
  end
11
16
 
@@ -1,22 +1,30 @@
1
1
  module PodPrebuild
2
2
  class DevPodsCacheValidator < BaseCacheValidator
3
- def initialize(options)
4
- super(options)
5
- @sandbox_root = options[:sandbox_root]
6
- end
7
-
8
3
  def validate(*)
9
4
  return PodPrebuild::CacheValidationResult.new if @pod_lockfile.nil?
10
5
 
11
- # TODO (thuyen): Logic needs to be revised
12
- # TODO (thuyen): Migrate the code PodCacheValidator.verify_devpod_checksum to this place
13
- missed_with_checksum, hit_with_checksum = PodCacheValidator.verify_devpod_checksum(
14
- @sandbox_root,
15
- @generated_framework_path,
16
- @pod_lockfile.lockfile
6
+ validate_pods(
7
+ pods: @pod_lockfile.dev_pods,
8
+ subspec_pods: [],
9
+ prebuilt_pods: @prebuilt_lockfile.nil? ? {} : @prebuilt_lockfile.dev_pods
17
10
  )
18
- missed = missed_with_checksum.transform_values { |checksum| "Checksum changed: #{checksum}" }
19
- PodPrebuild::CacheValidationResult.new(missed, hit_with_checksum.keys.to_set)
11
+ end
12
+
13
+ def incompatible_pod(name)
14
+ diff = super(name)
15
+ return diff unless diff.empty?
16
+
17
+ incompatible_source(name)
18
+ end
19
+
20
+ def incompatible_source(name)
21
+ diff = {}
22
+ prebuilt_hash = read_source_hash(name)
23
+ expected_hash = pod_lockfile.dev_pod_hash(name)
24
+ unless prebuilt_hash == expected_hash
25
+ diff[name] = { :prebuilt_hash => prebuilt_hash, :expected_hash => expected_hash}
26
+ end
27
+ diff
20
28
  end
21
29
  end
22
30
  end
@@ -5,7 +5,7 @@ module PodPrebuild
5
5
 
6
6
  validate_pods(
7
7
  pods: @pod_lockfile.non_dev_pods,
8
- subspec_pods: @pod_lockfile.subspec_pods,
8
+ subspec_pods: @pod_lockfile.subspec_vendor_pods,
9
9
  prebuilt_pods: @prebuilt_lockfile.nil? ? {} : @prebuilt_lockfile.non_dev_pods
10
10
  )
11
11
  end
@@ -1,56 +1,50 @@
1
1
  # Copyright 2019 Grabtaxi Holdings PTE LTE (GRAB), All rights reserved.
2
2
  # Use of this source code is governed by an MIT-style license that can be found in the LICENSE file
3
3
 
4
- require 'rgl/adjacency'
5
- require 'rgl/dot'
6
- require_relative 'graph_visualizer'
4
+ require "rgl/adjacency"
5
+ require "rgl/dot"
6
+ require_relative "graph_visualizer"
7
7
 
8
- # Using RGL graph because GraphViz doesn't store adjacent of a node/vertex but we need to traverse a substree from any node
8
+ # Using RGL graph because GraphViz doesn't store adjacent of a node/vertex
9
+ # but we need to traverse a substree from any node
9
10
  # https://github.com/monora/rgl/blob/master/lib/rgl/adjacency.rb
10
11
 
11
12
  class DependenciesGraph
12
13
  def initialize(lockfile)
13
14
  @lockfile = lockfile
14
- @invert_edge = true # A normal edge is an edge (one direction) from library A to library B which is a dependency of A.
15
+ # A normal edge is an edge (one direction) from library A to library B which is a dependency of A.
16
+ @invert_edge = true
15
17
  end
16
18
 
17
19
  # Input : a list of library names.
18
20
  # Output: a set of library names which are clients (directly and indirectly) of those input libraries.
19
21
  def get_clients(libnames)
20
- result = Set.new()
22
+ result = Set.new
21
23
  libnames.each do |lib|
22
24
  if graph.has_vertex?(lib)
23
25
  result.merge(traverse_sub_tree(graph, lib))
24
26
  else
25
- puts "Warning: cannot find lib: #{lib}"
27
+ Pod::UI.puts "Warning: cannot find lib: #{lib}"
26
28
  end
27
29
  end
28
30
  result
29
31
  end
30
32
 
31
- def write_graphic_file(output_graphic_fmt, filename='graph', highlight_nodes=Set[])
32
- if !output_graphic_fmt
33
- puts 'Error: Need graphic format.'
34
- return
35
- end
36
- graph.write_to_graphic_file(output_graphic_fmt, dotfile=filename, options={}, highlight_nodes)
33
+ def write_graphic_file(options)
34
+ graph.write_to_graphic_file(options)
37
35
  end
38
36
 
39
37
  private
40
38
 
41
39
  def dependencies
42
- @dependencies ||= begin
43
- if @lockfile
44
- @lockfile.to_hash['PODS']
45
- else
46
- nil
47
- end
48
- end
40
+ @dependencies ||= (@lockfile && @lockfile.to_hash["PODS"])
49
41
  end
50
42
 
51
43
  # Convert array of dictionaries -> a dictionary with format {A: [A's dependencies]}
52
44
  def pod_to_dependencies
53
- dependencies.map { |d| d.is_a?(Hash) ? d : { d => [] } }.reduce({}) { |combined, individual| combined.merge!(individual) }
45
+ dependencies
46
+ .map { |d| d.is_a?(Hash) ? d : { d => [] } }
47
+ .reduce({}) { |combined, individual| combined.merge!(individual) }
54
48
  end
55
49
 
56
50
  def add_vertex(graph, pod)
@@ -65,14 +59,15 @@ class DependenciesGraph
65
59
 
66
60
  def graph
67
61
  @graph ||= begin
68
- graph = RGL::DirectedAdjacencyGraph.new()
69
-
62
+ graph = RGL::DirectedAdjacencyGraph.new
70
63
  pod_to_dependencies.each do |pod, dependencies|
71
64
  pod_node = add_vertex(graph, pod)
72
65
  next if pod_node.nil?
66
+
73
67
  dependencies.each do |dependency|
74
68
  dep_node = add_vertex(graph, dependency)
75
69
  next if dep_node.nil?
70
+
76
71
  if @invert_edge
77
72
  graph.add_edge(dep_node, pod_node)
78
73
  else
@@ -85,11 +80,11 @@ class DependenciesGraph
85
80
  end
86
81
 
87
82
  def traverse_sub_tree(graph, vertex)
88
- visited_nodes = Set.new()
83
+ visited_nodes = Set.new
89
84
  graph.each_adjacent(vertex) do |v|
90
85
  visited_nodes.add(v)
91
86
  visited_nodes.merge(traverse_sub_tree(graph, v))
92
87
  end
93
88
  visited_nodes
94
89
  end
95
- end
90
+ end
@@ -2,73 +2,64 @@
2
2
  # Use of this source code is governed by an MIT-style license that can be found in the LICENSE file
3
3
  # https://github.com/monora/rgl/blob/0b526e16f9fb344abf387f4c5523d7917ce8f4b1/lib/rgl/dot.rb
4
4
 
5
- require 'rgl/rdot'
5
+ require "rgl/rdot"
6
6
 
7
7
  module RGL
8
8
  module Graph
9
- def to_dot_graph(params={}, highlight_nodes)
10
- params['name'] ||= self.class.name.gsub(/:/, '_')
11
- fontsize = params['fontsize'] ? params['fontsize'] : '12'
12
- graph = (directed? ? DOT::Digraph : DOT::Graph).new(params)
13
- edge_class = directed? ? DOT::DirectedEdge : DOT::Edge
14
- vertex_options = params['vertex'] || {}
15
- edge_options = params['edge'] || {}
9
+ def to_dot_graph(options)
10
+ highlight_nodes = options[:highlight_nodes] || Set.new
11
+ options["name"] ||= self.class.name.gsub(/:/, "_")
12
+ fontsize = options["fontsize"] || "12"
13
+ graph = (directed? ? DOT::Digraph : DOT::Graph).new(options)
14
+ edge_class = directed? ? DOT::DirectedEdge : DOT::Edge
15
+ vertex_options = options["vertex"] || {}
16
+ edge_options = options["edge"] || {}
16
17
 
17
18
  each_vertex do |v|
18
- default_vertex_options = {
19
- 'name' => vertex_id(v),
20
- 'fontsize' => fontsize,
21
- 'label' => vertex_label(v),
22
- 'style' => 'filled',
19
+ default_vertex_options = {
20
+ "name" => vertex_id(v),
21
+ "fontsize" => fontsize,
22
+ "label" => vertex_label(v),
23
+ "style" => "filled"
23
24
  }
24
- if highlight_nodes.include?(v)
25
- default_vertex_options = default_vertex_options.merge({
26
- 'color' => 'red',
27
- 'fillcolor' => 'red'
28
- })
29
- else
30
- default_vertex_options = default_vertex_options.merge({
31
- 'color' => 'blue',
32
- 'fillcolor' => 'blue'
33
- })
34
- end
35
-
25
+ default_vertex_options.merge!("color" => "red", "fillcolor" => "red") if highlight_nodes.include?(v)
36
26
  each_vertex_options = default_vertex_options.merge(vertex_options)
37
- vertex_options.each{|option, val| each_vertex_options[option] = val.call(v) if val.is_a?(Proc)}
27
+ vertex_options.each { |option, val| each_vertex_options[option] = val.call(v) if val.is_a?(Proc) }
38
28
  graph << DOT::Node.new(each_vertex_options)
39
29
  end
40
30
 
41
31
  each_edge do |u, v|
42
32
  default_edge_options = {
43
- 'from' => vertex_id(u),
44
- 'to' => vertex_id(v),
45
- 'fontsize' => fontsize
33
+ "from" => vertex_id(u),
34
+ "to" => vertex_id(v),
35
+ "fontsize" => fontsize
46
36
  }
47
37
  each_edge_options = default_edge_options.merge(edge_options)
48
- edge_options.each{|option, val| each_edge_options[option] = val.call(u, v) if val.is_a?(Proc)}
38
+ edge_options.each { |option, val| each_edge_options[option] = val.call(u, v) if val.is_a?(Proc) }
49
39
  graph << edge_class.new(each_edge_options)
50
40
  end
51
41
 
52
42
  graph
53
43
  end
54
44
 
55
- def write_to_graphic_file(fmt='png', dotfile="graph", options={}, highlight_nodes)
56
- src = dotfile + ".dot"
57
- dot = dotfile + "." + fmt
45
+ def write_to_graphic_file(options)
46
+ output_path = Pathname.new(options[:output_path])
47
+ fmt = output_path.extname.delete_prefix(".")
48
+ dotfile = output_path.sub_ext(".dot")
58
49
 
59
- File.open(src, 'w') do |f|
60
- f << self.to_dot_graph(params=options, highlight_nodes=highlight_nodes).to_s << "\n"
50
+ File.open(dotfile, "w") do |f|
51
+ f << to_dot_graph(options).to_s
61
52
  end
62
53
 
63
- unless system("dot -T#{fmt} #{src} -o #{dot}")
64
- message = <<-HEREDOC # Use <<- to indent End of String terminator
54
+ unless system("dot -T#{fmt} #{dotfile} -o #{output_path}")
55
+ message = <<~HEREDOC
65
56
  Error executing dot. Did you install GraphViz?
66
57
  Try installing it via Homebrew: `brew install graphviz`.
67
58
  Visit https://graphviz.org/download/ for more installation instructions.
68
59
  HEREDOC
69
60
  raise message
70
61
  end
71
- dot
62
+ output_path
72
63
  end
73
64
  end
74
65
  end
@@ -0,0 +1,13 @@
1
+ module PodPrebuild
2
+ class BaseDiagnosis
3
+ def initialize(options)
4
+ @cache_validation = options[:cache_validation]
5
+ @standard_sandbox = options[:standard_sandbox]
6
+ @specs = (options[:specs] || []).map { |s| [s.name, s] }.to_h
7
+ end
8
+
9
+ def spec(name)
10
+ @specs[name]
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,24 @@
1
+ require_relative "base"
2
+ require_relative "integration"
3
+
4
+ module PodPrebuild
5
+ class Diagnosis
6
+ def initialize(options)
7
+ @diagnosers = [
8
+ IntegrationDiagnosis
9
+ ].map { |klazz| klazz.new(options) }
10
+ end
11
+
12
+ def run
13
+ diagnosis = @diagnosers.map(&:run)
14
+ errors = diagnosis.select { |d| d[0] == :error }.map { |d| d[1] }
15
+ warnings = diagnosis.select { |d| d[0] == :error }.map { |d| d[1] }
16
+
17
+ warnings.each { |d| Pod::UI.puts "⚠️ #{d[1]}" }
18
+ errors.each { |d| Pod::UI.puts "🚩 #{d[1]}" }
19
+ return if errors.empty? || !PodPrebuild.config.strict_diagnosis?
20
+
21
+ raise "There are #{errors.count} error(s) spotted after the diagnosis"
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,23 @@
1
+ require_relative "base"
2
+
3
+ module PodPrebuild
4
+ class IntegrationDiagnosis < BaseDiagnosis
5
+ def run
6
+ should_be_integrated = if PodPrebuild.config.prebuild_job? \
7
+ then @cache_validation.hit + @cache_validation.missed \
8
+ else @cache_validation.hit \
9
+ end
10
+ should_be_integrated = should_be_integrated.map { |name| name.split("/")[0] }.to_set
11
+ unintegrated = should_be_integrated.reject do |name|
12
+ module_name = spec(name)&.module_name || name
13
+ framework_path = \
14
+ @standard_sandbox.pod_dir(name) + \
15
+ PodPrebuild.config.prebuilt_path(path: "#{module_name}.framework")
16
+ framework_path.exist?
17
+ end
18
+ return [] if unintegrated.empty?
19
+
20
+ [[:error, "Unintegrated frameworks: #{unintegrated}"]]
21
+ end
22
+ end
23
+ end