Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update CocoaPods gem to 1.0 #569

Merged
merged 6 commits into from
Jun 8, 2016
Merged

update CocoaPods gem to 1.0 #569

merged 6 commits into from
Jun 8, 2016

Conversation

jpsim
Copy link
Collaborator

@jpsim jpsim commented May 24, 2016

  • CHANGELOG

Closes #568

@orta
Copy link
Collaborator

orta commented May 24, 2016

:shipit:

@jpsim
Copy link
Collaborator Author

jpsim commented May 24, 2016

I appreciate the sentiment @orta, but 😞

ROOT/lib/jazzy/podspec_documenter.rb:91:in `block in pod_config': undefined method `integrate_targets=' for #<Pod::Config:0x007fea3bf983a0> (NoMethodError)
  from ROOT/lib/jazzy/podspec_documenter.rb:88:in `tap'
  from ROOT/lib/jazzy/podspec_documenter.rb:88:in `pod_config'
  from ROOT/lib/jazzy/podspec_documenter.rb:13:in `sourcekitten_output'
  from ROOT/lib/jazzy/doc_builder.rb:58:in `build'
  from ROOT/bin/jazzy:15:in `<main>'

@segiddins
Copy link
Collaborator

@jpsim that now needs to go in the podfile as install! 'cocoapods', integrate_targets: false

@jpsim
Copy link
Collaborator Author

jpsim commented Jun 7, 2016

Sorry Sam, I can't seem to get this to work. Here's what I've tried:

diff --git a/lib/jazzy/podspec_documenter.rb b/lib/jazzy/podspec_documenter.rb
index fc75c60..d918175 100644
--- a/lib/jazzy/podspec_documenter.rb
+++ b/lib/jazzy/podspec_documenter.rb
@@ -11,7 +11,12 @@ module Jazzy

     def sourcekitten_output
       sandbox = Pod::Sandbox.new(pod_config.sandbox_root)
+
       installer = Pod::Installer.new(sandbox, podfile)
+      installer.installation_options.integrate_targets = false
+      installer.installation_options.deduplicate_targets = false
+      installer.installation_options.deterministic_uuids = false
+
       installer.install!
       stdout = Dir.chdir(sandbox.root) do
         pod_targets.map do |t|
@@ -88,9 +93,6 @@ module Jazzy
       Pod::Config.instance.tap do |c|
         c.installation_root = Pathname(Dir.mktmpdir)
         c.installation_root.rmtree if c.installation_root.exist?
-        c.integrate_targets = false
-        c.deduplicate_targets = false
-        c.deterministic_uuids = false
       end
     end
diff --git a/lib/jazzy/podspec_documenter.rb b/lib/jazzy/podspec_documenter.rb
index fc75c60..1d3466f 100644
--- a/lib/jazzy/podspec_documenter.rb
+++ b/lib/jazzy/podspec_documenter.rb
@@ -88,9 +88,6 @@ module Jazzy
       Pod::Config.instance.tap do |c|
         c.installation_root = Pathname(Dir.mktmpdir)
         c.installation_root.rmtree if c.installation_root.exist?
-        c.integrate_targets = false
-        c.deduplicate_targets = false
-        c.deterministic_uuids = false
       end
     end

@@ -124,6 +121,9 @@ module Jazzy
             end
           end
         end
+        install! 'cocoapods', integrate_targets: false, 
+                              deduplicate_targets: false,
+                              deterministic_uuids: false
       end
     end
   end

In both those cases, I get this execution output:

COCOAPODS_SKIP_UPDATE_MESSAGE=TRUE JAZZY_FAKE_DATE=YYYY-MM-DD JAZZY_FAKE_VERSION=X.X.X JAZZY_INTEGRATION_SPECS=TRUE ruby ROOT/bin/jazzy --podspec=Moya.podspec 2>&1
Analyzing dependencies
Fetching podspec for `Moya` from `ROOT/tmp/document_moya_podspec`
Downloading dependencies
�[32mInstalling Alamofire (3.4.0)�[0m
�[32mInstalling Moya (6.4.0)�[0m
�[32mInstalling ReactiveCocoa (4.1.0)�[0m
�[32mInstalling Result (2.0.0)�[0m
�[32mInstalling RxSwift (2.5.0)�[0m
Generating Pods project
Pod installation complete! There are 4 dependencies from the Podfile and 5 total pods installed.
Running xcodebuild
Could not parse compiler arguments from `xcodebuild` output.
Please confirm that `xcodebuild` is building a Swift module.
Saved `xcodebuild` log file: /var/folders/np/5y4sgt8x3r13sk7x0n31z_3m0000gn/T/xcodebuild-278FD4AE-9CE5-4CC5-9423-E83C44EC41A1.log
Failed to generate documentation
ROOT/lib/jazzy/executable.rb:36:in `execute_command': ROOT/lib/jazzy/SourceKitten/bin/sourcekitten ["doc", "--module-name", "Moya", "--", "-target", "Pods-Jazzy-Moya-osx-Moya"] (RuntimeError)

Running xcodebuild

Could not parse compiler arguments from `xcodebuild` output.

Please confirm that `xcodebuild` is building a Swift module.

Saved `xcodebuild` log file: /var/folders/np/5y4sgt8x3r13sk7x0n31z_3m0000gn/T/xcodebuild-278FD4AE-9CE5-4CC5-9423-E83C44EC41A1.log

Failed to generate documentation
    from ROOT/lib/jazzy/sourcekitten.rb:145:in `run_sourcekitten'
    from ROOT/lib/jazzy/podspec_documenter.rb:18:in `block (2 levels) in sourcekitten_output'
    from ROOT/lib/jazzy/podspec_documenter.rb:17:in `map'
    from ROOT/lib/jazzy/podspec_documenter.rb:17:in `block in sourcekitten_output'
    from ROOT/lib/jazzy/podspec_documenter.rb:16:in `chdir'
    from ROOT/lib/jazzy/podspec_documenter.rb:16:in `sourcekitten_output'
    from ROOT/lib/jazzy/doc_builder.rb:60:in `build'
    from ROOT/bin/jazzy:15:in `<main>'

and it would appear the workspace is never actually generated:

$ ls tmp/document_moya_podspec
Cartfile
Cartfile.resolved
Carthage
Changelog.md
Contributing.md
Demo
Gemfile
Gemfile.lock
License.md
Moya.podspec
Moya.xcodeproj
Rakefile
Readme.md
Source
Supporting Files
build
docs
execution_output.txt
web

Do you have any thoughts on what I might be doing wrong?

@segiddins
Copy link
Collaborator

Right, no workspace should be generated there

@segiddins
Copy link
Collaborator

I can try and get this working as soon as I get my laptop back from Apple

@jpsim
Copy link
Collaborator Author

jpsim commented Jun 7, 2016

I can try and get this working as soon as I get my laptop back from Apple

Apple maketh. Apple taketh away.

@segiddins
Copy link
Collaborator

@jpsim done

@DangerCI
Copy link

DangerCI commented Jun 8, 2016

      <tr>
    <td>:white_check_mark:</td>
    <td data-sticky="true"><del><p>Please include a CHANGELOG entry. 

You can find it at CHANGELOG.md.














        :white_check_mark: Congrats.
    
  </th>
 </tr>

Please include a CHANGELOG entry.
You can find it at CHANGELOG.md.

Please include a CHANGELOG entry.
You can find it at CHANGELOG.md.

Please include a CHANGELOG entry.
You can find it at CHANGELOG.md.

      <tr>
    <td>:white_check_mark:</td>
    <td data-sticky="true"><del>Note, we hard-wrap at 80 chars and use 2 spaces after the last line.</del></td>
  </tr>
        :white_check_mark: Woo!
    
  </th>
 </tr>

Generated by 🚫 danger

@jpsim
Copy link
Collaborator Author

jpsim commented Jun 8, 2016

Many many thanks, Sam! That change was more involved than I thought! 😬

CI failure is due to the rouge gem update. I'll update the integration specs and take it from here.

@jpsim jpsim merged commit 3f98362 into master Jun 8, 2016
@jpsim jpsim deleted the jp-cp-1.0 branch June 8, 2016 21:50
@jpsim jpsim mentioned this pull request Jun 8, 2016
@pigeondotdev pigeondotdev modified the milestone: The Past Nov 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants