jazzy 0.15.1 → 0.15.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 233b49769d27b199b20651cff4041041fda0c9506945290fea84937ee5f1723f
4
- data.tar.gz: 55148a0bff106913b60dd295851d069a8aa344a21c2b52e3453d1bbeebd2a8ad
3
+ metadata.gz: 9a5cf4da18c11cdb04965d69968cee0b16db1720e9a8f31b9b27fbd4eaddd8fd
4
+ data.tar.gz: 5efbaf91ef7e253a86a652b45c5fbfd512d7dccccbf06aa2b53190f8a8a135d9
5
5
  SHA512:
6
- metadata.gz: f093b513515728c93ffce07528fe6042d05063b8b9b78e4283f89f9e41632a06509434bc3f533f2b4e1d9f30619cde090acff726a1463ea61669091f56734f41
7
- data.tar.gz: 36ba08e16c04d207568ce01f1e864bee4d495197cdf14bbc643d714e3ea85aeff2c9c102e4baa7122916f49dbf2d3e77dcf59ecebfd4a9c1839b5eb9bf18e08d
6
+ metadata.gz: 62074603cb5b33f8809ae5f5d9c16c5381947f4187d6e58f4d08c47ba2408479568bb9631d3c293e6a53ed7bdd0237ca928f931af496d13bf60715e90bfb3844
7
+ data.tar.gz: db5f645a8a7a5deaf0f6f2776ad17010a28d948d2cda1e2c3c4e8cb1a23e0ab14ac773a00b9fd8a6c88fd76198d4c756ce1536ce500a18ede7e42bcfd02493bb
@@ -34,15 +34,16 @@ jobs:
34
34
  - uses: actions/checkout@v4
35
35
  with:
36
36
  submodules: recursive
37
+ persist-credentials: false
37
38
  - uses: maxim-lobanov/setup-xcode@v1
38
39
  with:
39
- xcode-version: 15.3
40
+ xcode-version: '16.0'
40
41
  - uses: ruby/setup-ruby@v1
41
42
  with:
42
43
  ruby-version: 3.2
43
44
  bundler-cache: true
44
45
  - name: Cache cocoapods
45
- uses: actions/cache@v3
46
+ uses: actions/cache@v4
46
47
  env:
47
48
  cache-name: cocoapods
48
49
  with:
data/.rubocop.yml CHANGED
@@ -8,10 +8,10 @@ AllCops:
8
8
  SuggestExtensions: false
9
9
  TargetRubyVersion: 2.6
10
10
 
11
- #- Pending Cops as of 1.56.3 ---------------------------------------------#
12
-
13
-
11
+ #- Pending Cops as of 1.66.1 ---------------------------------------------#
14
12
 
13
+ Gemspec/AddRuntimeDependency: # new in 1.65
14
+ Enabled: true
15
15
  Gemspec/DeprecatedAttributeAssignment: # new in 1.30
16
16
  Enabled: true
17
17
  Gemspec/DevelopmentDependencies: # new in 1.44
@@ -84,6 +84,8 @@ Lint/UnexpectedBlockArity: # (new in 1.5)
84
84
  Enabled: true
85
85
  Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
86
86
  Enabled: true
87
+ Lint/UselessNumericOperation: # new in 1.66
88
+ Enabled: true
87
89
  Lint/UselessRescue: # new in 1.43
88
90
  Enabled: true
89
91
  Lint/UselessRuby2Keywords: # new in 1.23
@@ -188,6 +190,8 @@ Style/RedundantHeredocDelimiterQuotes: # new in 1.45
188
190
  Enabled: true
189
191
  Style/RedundantInitialize: # new in 1.27
190
192
  Enabled: true
193
+ Style/RedundantInterpolationUnfreeze: # new in 1.66
194
+ Enabled: true
191
195
  Style/RedundantLineContinuation: # new in 1.49
192
196
  Enabled: true
193
197
  Style/RedundantRegexpArgument: # new in 1.53
data/CHANGELOG.md CHANGED
@@ -1,3 +1,18 @@
1
+ ## 0.15.2
2
+
3
+ ##### Breaking
4
+
5
+ * None.
6
+
7
+ ##### Enhancements
8
+
9
+ * Support Swift 6.0 / Xcode 16.0
10
+ [John Fairhurst](https://github.com/johnfairh)
11
+
12
+ ##### Bug Fixes
13
+
14
+ * None.
15
+
1
16
  ## 0.15.1
2
17
 
3
18
  ##### Breaking
data/CONTRIBUTING.md CHANGED
@@ -49,7 +49,7 @@ git push
49
49
  You'll need push access to the integration specs repo to do this. You can
50
50
  request access from one of the maintainers when filing your PR.
51
51
 
52
- You must have Xcode 15.3 installed to build the integration specs.
52
+ You must have Xcode 16.0 installed to build the integration specs.
53
53
 
54
54
  ## Making changes to SourceKitten
55
55
 
data/Gemfile.lock CHANGED
@@ -9,7 +9,7 @@ GIT
9
9
  PATH
10
10
  remote: .
11
11
  specs:
12
- jazzy (0.15.1)
12
+ jazzy (0.15.2)
13
13
  cocoapods (~> 1.5)
14
14
  mustache (~> 1.1)
15
15
  open4 (~> 1.3)
@@ -27,18 +27,19 @@ GEM
27
27
  base64
28
28
  nkf
29
29
  rexml
30
- activesupport (7.1.3.4)
30
+ activesupport (7.2.1)
31
31
  base64
32
32
  bigdecimal
33
- concurrent-ruby (~> 1.0, >= 1.0.2)
33
+ concurrent-ruby (~> 1.0, >= 1.3.1)
34
34
  connection_pool (>= 2.2.5)
35
35
  drb
36
36
  i18n (>= 1.6, < 2)
37
+ logger (>= 1.4.2)
37
38
  minitest (>= 5.1)
38
- mutex_m
39
- tzinfo (~> 2.0)
40
- addressable (2.8.6)
41
- public_suffix (>= 2.0.2, < 6.0)
39
+ securerandom (>= 0.3)
40
+ tzinfo (~> 2.0, >= 2.0.5)
41
+ addressable (2.8.7)
42
+ public_suffix (>= 2.0.2, < 7.0)
42
43
  algoliasearch (1.27.5)
43
44
  httpclient (~> 2.8, >= 2.8.3)
44
45
  json (>= 1.5.1)
@@ -90,14 +91,14 @@ GEM
90
91
  netrc (~> 0.11)
91
92
  cocoapods-try (1.2.0)
92
93
  colored2 (3.1.2)
93
- concurrent-ruby (1.3.2)
94
+ concurrent-ruby (1.3.4)
94
95
  connection_pool (2.4.1)
95
96
  cork (0.3.0)
96
97
  colored2 (~> 3.1)
97
98
  crack (1.0.0)
98
99
  bigdecimal
99
100
  rexml
100
- danger (9.4.3)
101
+ danger (9.5.0)
101
102
  claide (~> 1.0)
102
103
  claide-plugins (>= 0.9.2)
103
104
  colored2 (~> 3.1)
@@ -107,7 +108,6 @@ GEM
107
108
  git (~> 1.13)
108
109
  kramdown (~> 2.3)
109
110
  kramdown-parser-gfm (~> 1.0)
110
- no_proxy_fix
111
111
  octokit (>= 4.0)
112
112
  terminal-table (>= 1, < 4)
113
113
  diffy (3.4.2)
@@ -115,11 +115,13 @@ GEM
115
115
  escape (0.0.4)
116
116
  ethon (0.16.0)
117
117
  ffi (>= 1.15.0)
118
- faraday (2.9.1)
119
- faraday-net_http (>= 2.0, < 3.2)
118
+ faraday (2.12.0)
119
+ faraday-net_http (>= 2.0, < 3.4)
120
+ json
121
+ logger
120
122
  faraday-http-cache (2.5.1)
121
123
  faraday (>= 0.8)
122
- faraday-net_http (3.1.0)
124
+ faraday-net_http (3.3.0)
123
125
  net-http
124
126
  ffi (1.17.0)
125
127
  fourflusher (2.3.1)
@@ -128,9 +130,9 @@ GEM
128
130
  git (1.19.1)
129
131
  addressable (~> 2.8)
130
132
  rchardet (~> 1.8)
131
- hashdiff (1.1.0)
133
+ hashdiff (1.1.1)
132
134
  httpclient (2.8.3)
133
- i18n (1.14.5)
135
+ i18n (1.14.6)
134
136
  concurrent-ruby (~> 1.0)
135
137
  json (2.7.2)
136
138
  kramdown (2.4.0)
@@ -139,55 +141,51 @@ GEM
139
141
  kramdown (~> 2.0)
140
142
  language_server-protocol (3.17.0.3)
141
143
  liferaft (0.0.6)
144
+ logger (1.6.1)
142
145
  mini_portile2 (2.8.7)
143
- minitest (5.23.1)
144
- mocha (2.3.0)
146
+ minitest (5.25.1)
147
+ mocha (2.4.5)
145
148
  ruby2_keywords (>= 0.0.5)
146
149
  mocha-on-bacon (0.2.3)
147
150
  mocha (>= 0.13.0)
148
151
  molinillo (0.8.0)
149
152
  mustache (1.1.1)
150
- mutex_m (0.2.0)
151
153
  nanaimo (0.3.0)
152
154
  nap (1.1.0)
153
155
  net-http (0.4.1)
154
156
  uri
155
157
  netrc (0.11.0)
156
158
  nkf (0.2.0)
157
- no_proxy_fix (0.1.2)
158
- octokit (8.1.0)
159
- base64
159
+ octokit (9.1.0)
160
160
  faraday (>= 1, < 3)
161
161
  sawyer (~> 0.9)
162
162
  open4 (1.3.4)
163
- parallel (1.24.0)
164
- parser (3.3.2.0)
163
+ parallel (1.26.3)
164
+ parser (3.3.5.0)
165
165
  ast (~> 2.4.1)
166
166
  racc
167
167
  prettybacon (0.0.2)
168
168
  bacon (~> 1.2)
169
169
  public_suffix (4.0.7)
170
- racc (1.8.0)
170
+ racc (1.8.1)
171
171
  rainbow (3.1.1)
172
172
  rake (13.2.1)
173
173
  rchardet (1.8.0)
174
174
  redcarpet (3.6.0)
175
175
  regexp_parser (2.9.2)
176
- rexml (3.2.8)
177
- strscan (>= 3.0.9)
178
- rouge (4.2.1)
179
- rubocop (1.64.1)
176
+ rexml (3.3.7)
177
+ rouge (4.4.0)
178
+ rubocop (1.66.1)
180
179
  json (~> 2.3)
181
180
  language_server-protocol (>= 3.17.0)
182
181
  parallel (~> 1.10)
183
182
  parser (>= 3.3.0.2)
184
183
  rainbow (>= 2.2.2, < 4.0)
185
- regexp_parser (>= 1.8, < 3.0)
186
- rexml (>= 3.2.5, < 4.0)
187
- rubocop-ast (>= 1.31.1, < 2.0)
184
+ regexp_parser (>= 2.4, < 3.0)
185
+ rubocop-ast (>= 1.32.2, < 2.0)
188
186
  ruby-progressbar (~> 1.7)
189
187
  unicode-display_width (>= 2.4.0, < 3.0)
190
- rubocop-ast (1.31.3)
188
+ rubocop-ast (1.32.3)
191
189
  parser (>= 3.3.1.0)
192
190
  ruby-macho (2.5.1)
193
191
  ruby-progressbar (1.13.0)
@@ -197,30 +195,30 @@ GEM
197
195
  sawyer (0.9.2)
198
196
  addressable (>= 2.3.5)
199
197
  faraday (>= 0.17.3, < 3)
198
+ securerandom (0.3.1)
200
199
  sqlite3 (1.7.3)
201
200
  mini_portile2 (~> 2.8.0)
202
- strscan (3.1.0)
203
201
  terminal-table (3.0.2)
204
202
  unicode-display_width (>= 1.1.1, < 3)
205
203
  typhoeus (1.4.1)
206
204
  ethon (>= 0.9.0)
207
205
  tzinfo (2.0.6)
208
206
  concurrent-ruby (~> 1.0)
209
- unicode-display_width (2.5.0)
210
- uri (0.13.0)
207
+ unicode-display_width (2.6.0)
208
+ uri (0.13.1)
211
209
  webmock (3.23.1)
212
210
  addressable (>= 2.8.0)
213
211
  crack (>= 0.3.2)
214
212
  hashdiff (>= 0.4.0, < 2.0.0)
215
213
  xcinvoke (0.3.0)
216
214
  liferaft (~> 0.0.6)
217
- xcodeproj (1.24.0)
215
+ xcodeproj (1.25.0)
218
216
  CFPropertyList (>= 2.3.3, < 4.0)
219
217
  atomos (~> 0.1.3)
220
218
  claide (>= 1.0.2, < 2.0)
221
219
  colored2 (~> 3.1)
222
220
  nanaimo (~> 0.3.0)
223
- rexml (~> 3.2.4)
221
+ rexml (>= 3.3.2, < 4.0)
224
222
 
225
223
  PLATFORMS
226
224
  ruby
data/jazzy.gemspec CHANGED
@@ -18,15 +18,15 @@ Gem::Specification.new do |spec|
18
18
  spec.files = `git ls-files`.split($/)
19
19
  spec.executables << 'jazzy'
20
20
 
21
- spec.add_runtime_dependency 'cocoapods', '~> 1.5'
22
- spec.add_runtime_dependency 'mustache', '~> 1.1'
23
- spec.add_runtime_dependency 'open4', '~> 1.3'
24
- spec.add_runtime_dependency 'redcarpet', '~> 3.4'
25
- spec.add_runtime_dependency 'rexml', ['>= 3.2.7', '< 4.0']
26
- spec.add_runtime_dependency 'rouge', ['>= 2.0.6', '< 5.0']
27
- spec.add_runtime_dependency 'sassc', '~> 2.1'
28
- spec.add_runtime_dependency 'sqlite3', '~> 1.3'
29
- spec.add_runtime_dependency 'xcinvoke', '~> 0.3.0'
21
+ spec.add_dependency 'cocoapods', '~> 1.5'
22
+ spec.add_dependency 'mustache', '~> 1.1'
23
+ spec.add_dependency 'open4', '~> 1.3'
24
+ spec.add_dependency 'redcarpet', '~> 3.4'
25
+ spec.add_dependency 'rexml', ['>= 3.2.7', '< 4.0']
26
+ spec.add_dependency 'rouge', ['>= 2.0.6', '< 5.0']
27
+ spec.add_dependency 'sassc', '~> 2.1'
28
+ spec.add_dependency 'sqlite3', '~> 1.3'
29
+ spec.add_dependency 'xcinvoke', '~> 0.3.0'
30
30
 
31
31
  spec.add_development_dependency 'bundler', '~> 2.1'
32
32
  spec.add_development_dependency 'rake', '~> 13.0'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Jazzy
4
- VERSION = '0.15.1' unless defined? Jazzy::VERSION
4
+ VERSION = '0.15.2' unless defined? Jazzy::VERSION
5
5
  end
@@ -102,7 +102,7 @@ module Jazzy
102
102
  private_class_method :github_file_prefix
103
103
 
104
104
  # Latest valid value for SWIFT_VERSION.
105
- LATEST_SWIFT_VERSION = '5'
105
+ LATEST_SWIFT_VERSION = '6'
106
106
 
107
107
  # All valid values for SWIFT_VERSION that are longer
108
108
  # than a major version number. Ordered ascending.
@@ -485,10 +485,19 @@ module Jazzy
485
485
  # @available attrs only in compiler 'interface' style
486
486
  extract_availability(doc['key.doc.declaration'] || '')
487
487
  .concat(extract_documented_attributes(annotated_decl_attrs))
488
+ .concat(fabricate_spi_attributes(doc, annotated_decl_attrs))
488
489
  .push(decl)
489
490
  .join("\n")
490
491
  end
491
492
 
493
+ # Swift 6 workaround: @_spi attribute & SPI group missing
494
+ def self.fabricate_spi_attributes(doc, attrs)
495
+ return [] unless spi_attribute?(doc)
496
+ return [] if attrs =~ /@_spi/
497
+
498
+ ['@_spi(<<unknown>>)']
499
+ end
500
+
492
501
  # Exclude non-async routines that accept async closures
493
502
  def self.swift_async?(fully_annotated_decl)
494
503
  document = REXML::Document.new(fully_annotated_decl)
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'set'
4
+
3
5
  module Jazzy
4
6
  module SymbolGraph
5
7
  # For extensions we need to track constraints of the extended type
@@ -26,7 +28,7 @@ module Jazzy
26
28
  attr_accessor :real_usr
27
29
  attr_accessor :name
28
30
  attr_accessor :all_constraints # ExtConstraints
29
- attr_accessor :conformances # array, can be empty
31
+ attr_accessor :conformances # set, can be empty
30
32
 
31
33
  # Deduce an extension from a member of an unknown type or
32
34
  # of known type with additional constraints
@@ -54,7 +56,7 @@ module Jazzy
54
56
  self.usr = usr
55
57
  self.name = name
56
58
  self.all_constraints = constraints
57
- self.conformances = []
59
+ self.conformances = Set.new
58
60
  super()
59
61
  end
60
62
 
@@ -65,13 +67,13 @@ module Jazzy
65
67
  end
66
68
 
67
69
  def add_conformance(protocol)
68
- conformances.append(protocol).sort!
70
+ conformances.add(protocol)
69
71
  end
70
72
 
71
73
  def full_declaration
72
74
  decl = "extension #{name}"
73
75
  unless conformances.empty?
74
- decl += " : #{conformances.join(', ')}"
76
+ decl += " : #{conformances.sort.join(', ')}"
75
77
  end
76
78
  decl + all_constraints.ext.to_where_clause
77
79
  end
@@ -90,7 +92,7 @@ module Jazzy
90
92
  }
91
93
 
92
94
  unless conformances.empty?
93
- hash['key.inheritedtypes'] = conformances.map do |conformance|
95
+ hash['key.inheritedtypes'] = conformances.sort.map do |conformance|
94
96
  { 'key.name' => conformance }
95
97
  end
96
98
  end
@@ -100,11 +102,13 @@ module Jazzy
100
102
  hash
101
103
  end
102
104
 
103
- # Sort order - by type name then constraint
105
+ # Sort order - by type name then constraint then conformances
106
+ # Conformance check needed for stable order with Swift 5.9
107
+ # extension symbols that can't merge as well as previously.
104
108
  include Comparable
105
109
 
106
110
  def sort_key
107
- name + constraints.map(&:to_swift).join
111
+ name + constraints.map(&:to_swift).join + conformances.sort.join
108
112
  end
109
113
 
110
114
  def <=>(other)
@@ -34,7 +34,7 @@ module Jazzy
34
34
  # Protocol conformances added by compiler to actor decls that
35
35
  # users aren't interested in.
36
36
  def actor_protocol?
37
- %w[Actor Sendable].include?(target_fallback)
37
+ %w[Actor AnyActor Sendable].include?(target_fallback)
38
38
  end
39
39
 
40
40
  def initialize(hash)
@@ -22,7 +22,7 @@ function itemLinkToContent($link) {
22
22
  return $link.parent().parent().next();
23
23
  }
24
24
 
25
- // On doc load + hash-change, open any targetted item
25
+ // On doc load + hash-change, open any targeted item
26
26
  function openCurrentItemIfClosed() {
27
27
  if (window.jazzy.docset) {
28
28
  return;
@@ -22,7 +22,7 @@ function itemLinkToContent($link) {
22
22
  return $link.parent().parent().next();
23
23
  }
24
24
 
25
- // On doc load + hash-change, open any targetted item
25
+ // On doc load + hash-change, open any targeted item
26
26
  function openCurrentItemIfClosed() {
27
27
  if (window.jazzy.docset) {
28
28
  return;
@@ -22,7 +22,7 @@ function itemLinkToContent($link) {
22
22
  return $link.parent().parent().next();
23
23
  }
24
24
 
25
- // On doc load + hash-change, open any targetted item
25
+ // On doc load + hash-change, open any targeted item
26
26
  function openCurrentItemIfClosed() {
27
27
  if (window.jazzy.docset) {
28
28
  return;
@@ -146,6 +146,15 @@ describe_cli 'jazzy' do
146
146
  </script>
147
147
  HTML
148
148
 
149
+ realm_jazzy_yaml = <<-YAML
150
+ build_tool_arguments:
151
+ - "-scheme"
152
+ - "RealmSwift"
153
+ - "SWIFT_VERSION=4.2"
154
+ - "-destination"
155
+ - "platform=OS X,arch=x86_64"
156
+ YAML
157
+
149
158
  spec_subset = ENV.fetch('JAZZY_SPEC_SUBSET', nil)
150
159
 
151
160
  # rubocop:disable Style/MultilineIfModifier
@@ -208,9 +217,15 @@ describe_cli 'jazzy' do
208
217
 
209
218
  describe 'Creates Realm Swift docs' do
210
219
  realm_version = ''
211
- Dir.chdir(ROOT + 'spec/integration_specs/document_realm_swift/before') do
220
+ realm_path = ROOT + 'spec/integration_specs/document_realm_swift/before'
221
+ realm_jazzy_path = realm_path + '.jazzy.yaml'
222
+
223
+ Dir.chdir(realm_path) do
212
224
  realm_version = `./build.sh get-version`.chomp
213
225
  end
226
+ # Xcode 16 workaround
227
+ File.write(realm_jazzy_path, realm_jazzy_yaml)
228
+
214
229
  behaves_like cli_spec 'document_realm_swift',
215
230
  '--author Realm ' \
216
231
  '--author_url "https://realm.io" ' \
@@ -222,10 +237,8 @@ describe_cli 'jazzy' do
222
237
  "--module-version #{realm_version} " \
223
238
  '--root-url https://realm.io/docs/swift/' \
224
239
  "#{realm_version}/api/ " \
225
- '--xcodebuild-arguments ' \
226
- '-scheme,RealmSwift,SWIFT_VERSION=4.2,' \
227
- "-destination,'platform=OS X' " \
228
240
  "--head #{realm_head.shellescape}"
241
+ FileUtils.rm_rf realm_jazzy_path
229
242
  end
230
243
 
231
244
  describe 'Creates Siesta docs' do
@@ -249,7 +262,8 @@ describe_cli 'jazzy' do
249
262
  behaves_like cli_spec 'misc_jazzy_symgraph_features',
250
263
  '--swift-build-tool symbolgraph ' \
251
264
  '--build-tool-arguments ' \
252
- "-emit-extension-block-symbols,-I,#{module_path}"
265
+ '-emit-extension-block-symbols,-I,' \
266
+ "#{module_path.chomp}/Modules"
253
267
  end
254
268
 
255
269
  describe 'Creates docs for a multiple-module project' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jazzy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.1
4
+ version: 0.15.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Simard
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-06-08 00:00:00.000000000 Z
14
+ date: 2024-09-20 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: cocoapods