diff --git a/CHANGELOG.md b/CHANGELOG.md index 66bb530e3..c5e11ee49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,9 @@ [#789](https://github.com/realm/jazzy/issues/789) [#805](https://github.com/realm/jazzy/issues/805) +* Fix Swift 4 declarations containing ampersands (`&`) being truncated. + [JP Simard](https://github.com/jpsim) + ## 0.8.3 ##### Breaking diff --git a/SourceKitten b/SourceKitten index 2eefaa3f0..6ccb79fb4 160000 --- a/SourceKitten +++ b/SourceKitten @@ -1 +1 @@ -Subproject commit 2eefaa3f0ed9e3f7ee021ad06d74130320bdbb1b +Subproject commit 6ccb79fb43e8d12573e9b186f054c4c3c848e085 diff --git a/bin/sourcekitten b/bin/sourcekitten index c10155577..9b712c79f 100755 Binary files a/bin/sourcekitten and b/bin/sourcekitten differ diff --git a/circle.yml b/circle.yml index 5ad6371a3..b83c62680 100644 --- a/circle.yml +++ b/circle.yml @@ -1,6 +1,6 @@ machine: xcode: - version: "8.3.2" + version: "9.0" checkout: post: diff --git a/lib/jazzy/podspec_documenter.rb b/lib/jazzy/podspec_documenter.rb index 5462bc5a1..c4e2fde8c 100644 --- a/lib/jazzy/podspec_documenter.rb +++ b/lib/jazzy/podspec_documenter.rb @@ -2,6 +2,7 @@ require 'json' module Jazzy + # rubocop:disable Metrics/ClassLength class PodspecDocumenter attr_reader :podspec @@ -14,7 +15,8 @@ def initialize(podspec) def sourcekitten_output(config) installation_root = Pathname(Dir.mktmpdir(['jazzy', podspec.name])) installation_root.rmtree if installation_root.exist? - Pod::Config.instance.with_changes(installation_root: installation_root) do + Pod::Config.instance.with_changes(installation_root: installation_root, + verbose: false) do sandbox = Pod::Sandbox.new(Pod::Config.instance.sandbox_root) installer = Pod::Installer.new(sandbox, podfile) installer.install! @@ -25,7 +27,7 @@ def sourcekitten_output(config) targets.map do |t| args = %W[doc --module-name #{podspec.module_name} -- -target #{t}] - swift_version = (config.swift_version || '3')[0] + '.0' + swift_version = (config.swift_version || '4')[0] + '.0' args << "SWIFT_VERSION=\"#{swift_version}\"" SourceKitten.run_sourcekitten(args) end @@ -117,8 +119,12 @@ def podfile ss.available_platforms.each do |p| # Travis builds take too long when building docs for all available # platforms for the Moya integration spec, so we just document OSX. + # Also Moya's RxSwift subspec doesn't yet support Swift 4, so skip + # that too while we're at it. # TODO: remove once jazzy is fast enough. - next if ENV['JAZZY_INTEGRATION_SPECS'] && p.name != :osx + if ENV['JAZZY_INTEGRATION_SPECS'] + next if (p.name != :osx) || (ss.name == 'Moya/RxSwift') + end target("Jazzy-#{ss.name.gsub('/', '__')}-#{p.name}") do use_frameworks! platform p.name, p.deployment_target diff --git a/spec/integration_spec.rb b/spec/integration_spec.rb index c99aa7f0e..8fb350724 100644 --- a/spec/integration_spec.rb +++ b/spec/integration_spec.rb @@ -208,8 +208,8 @@ behaves_like cli_spec 'document_siesta', # Siesta already has Docs/ '--output api-docs', - # Use default Swift rather than the specified 3.0.2 - '--swift-version=' + # Use Swift 4 rather than the specified 3.0.2 + '--swift-version=4' end describe 'Creates docs for Swift project with a variety of contents' do diff --git a/spec/integration_specs b/spec/integration_specs index dc4150d12..5adf5beb2 160000 --- a/spec/integration_specs +++ b/spec/integration_specs @@ -1 +1 @@ -Subproject commit dc4150d120d032094b144b1a235df1a35eea53d8 +Subproject commit 5adf5beb21455fb99d11b3ea824b111349d2c0f2