Module: XCCache::SPM::Package::UmbrellaBuildMixin
- Included in:
- Umbrella
- Defined in:
- lib/xccache/spm/pkg/umbrella/build.rb
Instance Method Summary collapse
Instance Method Details
#build(options = {}) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/xccache/spm/pkg/umbrella/build.rb', line 5 def build( = {}) to_build = targets_to_build() return UI.warn("Detected no targets to build among cache-missed targets") if to_build.empty? UI.info("-> Targets to build: #{to_build.to_s.bold}") super(.merge(:targets => to_build)) sync_cachemap(sdks: [:sdks]) end |
#targets_to_build(options) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/xccache/spm/pkg/umbrella/build.rb', line 14 def targets_to_build() items = [:targets] || [] items = config.cachemap.missed.map { |x| File.basename(x) } if items.empty? targets = @descs.flat_map(&:targets).select { |t| items.include?(t.name) } if [:recursive] UI.("Will include cache-missed recursive targets") targets += targets.flat_map do |t| t.recursive_targets.select { |x| config.cachemap.missed?(x.full_name) } end end # TODO: Sort by number of dependents targets.map(&:full_name).uniq end |