xccache 1.0.0 → 1.0.1.rc15390855924

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58a60ae32df0e91fde269eb085ee92700365eecd2adb4a6360e9104e3e7091f1
4
- data.tar.gz: 28caf0fc84bf730a78ec3204c9b908ea67a2aacc609ec41e25f46686cf8daefa
3
+ metadata.gz: 49f968905b37c1abaa715789a33a9541f8bacc2b6cb6dc977b111609a64ebcf0
4
+ data.tar.gz: 27fa86909bc610e202efcf8fef604feca6563c6b88a879363bf021e2345cdc09
5
5
  SHA512:
6
- metadata.gz: 45e18eafa038e1ad80a6beede33c7b90f942f069aefb32f15236ba215b128f86d982897c0b4fc8edcaba69bd6e5c11007f8d56d5240a7b3b0a02866a5f0b7143
7
- data.tar.gz: 55d8655668175dd6e4c8939d144a4360cad88dfd561a8e394b36bf551fb68f1bbab7d22ba835a3e1744b36a3a21ba85ff4977eeff4890b7fd7801e6e3edd5370
6
+ metadata.gz: e99517798ad0d7b733f918e7d1863f57b551c481913769bb20c255b1accdcbf781984ed87b3d8257ecd16fe0f49aa14b4abadb77b50e654b8800bfdf1b1e4253
7
+ data.tar.gz: d283643742be4fef5b01ce53a98f2651ae1fc896a3d00abab3322242bb11ab984a4688064bb674584d3f4a9866ef849e3a274fea0786ac28eca06a3b25c9749c
@@ -0,0 +1,2 @@
1
+ # Check out this doc for details
2
+ # https://github.com/trinhngocthuyen/xccache/blob/main/docs/configuration.md
@@ -3,7 +3,7 @@ require "xccache/installer"
3
3
  module XCCache
4
4
  class Command
5
5
  class Options
6
- SDK = ["--sdk=foo,bar", "SDKs (iphonesimulator, iphoneos, etc.)"].freeze
6
+ SDK = ["--sdk=foo,bar", "SDKs (iphonesimulator, iphoneos, macos, etc.)"].freeze
7
7
  CONFIG = ["--config=foo", "Configuration (debug, release) (default: debug)"].freeze
8
8
  MERGE_SLICES = [
9
9
  "--merge-slices/--no-merge-slices",
@@ -23,6 +23,10 @@ module XCCache
23
23
 
24
24
  attr_writer :install_config
25
25
 
26
+ def ensure_file!
27
+ Template.new("xccache.yml").render(save_to: path) unless path.exist?
28
+ end
29
+
26
30
  def install_config
27
31
  @install_config || "debug"
28
32
  end
@@ -19,6 +19,7 @@ module XCCache
19
19
  verify_projects!
20
20
  projects.each { |project| migrate_umbrella_to_proxy(project) }
21
21
  UI.message("Using cache dir: #{config.spm_cache_dir}")
22
+ config.ensure_file!
22
23
  config.in_installation = true
23
24
  sync_lockfile
24
25
  proxy_pkg.prepare(@install_options)
@@ -99,7 +100,7 @@ module XCCache
99
100
  add_file = proc { |p| group[p.basename.to_s] || group.new_file(p) }
100
101
  add_file.call(config.spm_proxy_sandbox / "Package.swift")
101
102
  add_file.call(config.lockfile.path)
102
- add_file.call(config.path) if config.path.exist?
103
+ add_file.call(config.path)
103
104
  group.ensure_synced_group(name: "local-packages", path: config.spm_local_pkgs_dir)
104
105
  end
105
106
 
@@ -3,12 +3,9 @@ require_relative "build"
3
3
  module XCCache
4
4
  module SPM
5
5
  class Macro < Buildable
6
- attr_reader :macosx_sdk
7
-
8
6
  def initialize(options = {})
9
7
  super
10
8
  @library_evolution = false # swift-syntax is not compatible with library evolution
11
- @macosx_sdk = Swift::Sdk.new(:macosx)
12
9
  end
13
10
 
14
11
  def build(_options = {})
@@ -37,7 +34,7 @@ module XCCache
37
34
  end
38
35
 
39
36
  def products_dir
40
- @products_dir ||= pkg_dir / ".build" / macosx_sdk.triple / config
37
+ @products_dir ||= pkg_dir / ".build" / "arm64-apple-macosx" / config
41
38
  end
42
39
  end
43
40
  end
@@ -4,7 +4,7 @@ module XCCache
4
4
  class Proxy < Package
5
5
  class Executable
6
6
  REPO_URL = "https://github.com/trinhngocthuyen/xccache-proxy".freeze
7
- VERSION_OR_SHA = "0.0.1".freeze
7
+ VERSION_OR_SHA = "1.0.0rc1".freeze
8
8
 
9
9
  def run(cmd)
10
10
  env = { "FORCE_OUTPUT" => "console", "FORCE_COLOR" => "1" } if Config.instance.ansi?
@@ -8,11 +8,19 @@ module XCCache
8
8
  NAME_TO_TRIPLE = {
9
9
  :iphonesimulator => "arm64-apple-ios-simulator",
10
10
  :iphoneos => "arm64-apple-ios",
11
- :macosx => "arm64-apple-macosx",
11
+ :macos => "arm64-apple-macos",
12
+ :watchos => "arm64-apple-watchos",
13
+ :watchsimulator => "arm64-apple-watchos-simulator",
14
+ :appletvos => "arm64-apple-tvos",
15
+ :appletvsimulator => "arm64-apple-tvos-simulator",
16
+ :xros => "arm64-apple-xros",
17
+ :xrsimulator => "arm64-apple-xros-simulator",
12
18
  }.freeze
13
19
 
14
20
  def initialize(name)
15
21
  @name = name
22
+ return if NAME_TO_TRIPLE.key?(name.to_sym)
23
+ raise GeneralError, "Unknown sdk: #{name}. Must be one of #{NAME_TO_TRIPLE.keys}"
16
24
  end
17
25
 
18
26
  def to_s
@@ -25,11 +33,15 @@ module XCCache
25
33
  res
26
34
  end
27
35
 
36
+ def sdk_name
37
+ name == "macos" ? "macosx" : name
38
+ end
39
+
28
40
  def sdk_path
29
41
  # rubocop:disable Layout/LineLength
30
42
  # /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk
31
43
  # rubocop:enable Layout/LineLength
32
- @sdk_path ||= Pathname(Sh.capture_output("xcrun --sdk #{name} --show-sdk-path")).realpath
44
+ @sdk_path ||= Pathname(Sh.capture_output("xcrun --sdk #{sdk_name} --show-sdk-path")).realpath
33
45
  end
34
46
 
35
47
  def sdk_platform_developer_path
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xccache
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1.rc15390855924
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thuyen Trinh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-05-31 00:00:00.000000000 Z
11
+ date: 2025-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: claide
@@ -69,6 +69,7 @@ files:
69
69
  - lib/xccache/assets/templates/framework.modulemap.template
70
70
  - lib/xccache/assets/templates/resource_bundle_accessor.m.template
71
71
  - lib/xccache/assets/templates/resource_bundle_accessor.swift.template
72
+ - lib/xccache/assets/templates/xccache.yml.template
72
73
  - lib/xccache/cache/cachemap.rb
73
74
  - lib/xccache/command.rb
74
75
  - lib/xccache/command/base.rb
@@ -161,9 +162,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
161
162
  version: '0'
162
163
  required_rubygems_version: !ruby/object:Gem::Requirement
163
164
  requirements:
164
- - - ">="
165
+ - - ">"
165
166
  - !ruby/object:Gem::Version
166
- version: '0'
167
+ version: 1.3.1
167
168
  requirements: []
168
169
  rubygems_version: 3.2.33
169
170
  signing_key: