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

documentation generation is not working when setting the Watch scheme #73

Open
merlos opened this issue Feb 18, 2019 · 4 comments
Open
Labels

Comments

@merlos
Copy link
Owner

merlos commented Feb 18, 2019

This works fine

export OUTPUT_PATH=/tmp/docs
jazzy --output=$OUTPUT_PATH --min-acl private -x clean,build,-workspace,OpenGpxTracker.xcworkspace,-scheme,OpenGpxTracker

If we change the scheme to OpenGpxTracker-Watch, it does not work

jazzy --output=$OUTPUT_PATH --min-acl private -x clean,build,-workspace,OpenGpxTracker.xcworkspace,-scheme,OpenGpxTracker-Watch

However, this works (scheme OpenGpxTracker-Watch):

xcodebuild clean build -workspace OpenGpxTracker.xcworkspace -scheme OpenGpxTracker-Watch

This is the output of jazzy --output=$OUTPUT_PATH --min-acl private -x clean,build,-workspace,OpenGpxTracker.xcworkspace,-scheme,OpenGpxTracker-Watch

mcfly-2:OpenGpxTracker merlos$ jazzy --output=$OUTPUT_PATH --min-acl private -x clean,build,-workspace,OpenGpxTracker.xcworkspace,-scheme,OpenGpxTracker-Watch
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/qy/hr8jkqt964z5y9h8jm7vt8ym0000gn/T/xcodebuild-E88E01E6-AA85-4619-B650-7919477A9102.log
Failed to generate documentation
/Users/merlos/.rvm/gems/ruby-2.3.3/gems/jazzy-0.9.5/lib/jazzy/executable.rb:36:in `execute_command': /Users/merlos/.rvm/gems/ruby-2.3.3/gems/jazzy-0.9.5/bin/sourcekitten ["doc", "--", "clean", "build", "-workspace", "OpenGpxTracker.xcworkspace", "-scheme", "OpenGpxTracker-Watch"] (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/qy/hr8jkqt964z5y9h8jm7vt8ym0000gn/T/xcodebuild-E88E01E6-AA85-4619-B650-7919477A9102.log

Failed to generate documentation
	from /Users/merlos/.rvm/gems/ruby-2.3.3/gems/jazzy-0.9.5/lib/jazzy/sourcekitten.rb:230:in `run_sourcekitten'
	from /Users/merlos/.rvm/gems/ruby-2.3.3/gems/jazzy-0.9.5/lib/jazzy/doc_builder.rb:65:in `block in build'
	from /Users/merlos/.rvm/gems/ruby-2.3.3/gems/jazzy-0.9.5/lib/jazzy/doc_builder.rb:63:in `chdir'
	from /Users/merlos/.rvm/gems/ruby-2.3.3/gems/jazzy-0.9.5/lib/jazzy/doc_builder.rb:63:in `build'
	from /Users/merlos/.rvm/gems/ruby-2.3.3/gems/jazzy-0.9.5/bin/jazzy:15:in `<top (required)>'
	from /Users/merlos/.rvm/gems/ruby-2.3.3/bin/jazzy:22:in `load'
	from /Users/merlos/.rvm/gems/ruby-2.3.3/bin/jazzy:22:in `<main>'
	from /Users/merlos/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `eval'
	from /Users/merlos/.rvm/gems/ruby-2.3.3/bin/ruby_executable_hooks:15:in `<main>'
@merlos
Copy link
Owner Author

merlos commented Feb 18, 2019

TODO: Pending analyze logfile metioned in the output.

@merlos merlos added the bug label Feb 18, 2019
@merlos merlos changed the title documentation is not working when setting the Watch scheme documentation generation is not working when setting the Watch scheme Feb 18, 2019
@vincentneo
Copy link
Collaborator

I know nothing about jazzy, and I can't seem to get it installed, too. So I can't help much.

Anyways, would using scheme OpenGpxTracker-Watch Extension instead? Considering most code seem to be there?

Also, take a look at realm/jazzy#862 as it seems related.

@merlos
Copy link
Owner Author

merlos commented Apr 28, 2019

I am stuck with this issue. I can get iOS app documentation but not the Apple Watch one.

It seems that the source of the problem is in an underlying package (https://github.com/jpsim/SourceKitten) that extracts a JSON from the Swift files that is used as input by jazzy.

I have tried all the following:

sourcekitten doc -- -workspace OpenGpxTracker.xcworkspace -scheme "OpenGpxTracker-Watch"  
sourcekitten doc --module-name "OpenGpxTracker-Watch Extension" -- -workspace OpenGpxTracker.xcworkspace -scheme "OpenGpxTracker-Watch"  
sourcekitten doc --module-name OpenGpxTracker-Watch Extension -- -workspace OpenGpxTracker.xcworkspace -scheme "OpenGpxTracker-Watch"  
sourcekitten doc --module-name OpenGpxTracker-Watch -- -workspace OpenGpxTracker.xcworkspace -scheme "OpenGpxTracker-Watch"  
sourcekitten doc --module-name OpenGpxTracker-Watch -- -workspace OpenGpxTracker.xcworkspace -scheme "OpenGpxTracker-Watch"  
sourcekitten doc --module-name CoreGPX-iOS -- -workspace OpenGpxTracker.xcworkspace -scheme "OpenGpxTracker"  
sourcekitten doc --module-name "OpenGpxTracker-Watch Complication" -- -workspace OpenGpxTracker.xcworkspace -scheme "OpenGpxTracker-Watch"  
sourcekitten doc --module-name "OpenGpxTracker-Watch Extension" -- -workspace OpenGpxTracker.xcworkspace -scheme "OpenGpxTracker-Watch"  
sourcekitten doc --module-name "OpenGpxTracker-Watch Extension" -- -workspace OpenGpxTracker.xcworkspace -scheme "OpenGpxTracker-Watch (Complication)"

All the time I am getting the following:

Running xcodebuild
Checking xcodebuild -showBuildSettings
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/qy/hr8jkqt964z5y9h8jm7vt8ym0000gn/T/xcodebuild-8EE4A182-B4FD-4073-9AED-4979DA0302E2.log

Related issues I diged in:
realm/jazzy#564
realm/jazzy#625
realm/jazzy#781
realm/jazzy#862

xcodebuild doc (is an old but still applies)
https://developer.apple.com/library/archive/technotes/tn2339/_index.html

Running

  xcodebuild  -list

Output of command above (updated Apr 2019)

 Information about project "OpenGpxTracker":
    Targets:
        OpenGpxTracker
        OpenGpxTrackerTests
        OpenGpxTracker-Watch
        OpenGpxTracker-Watch Extension

    Build Configurations:
        Debug
        Release

    If no build configuration is specified and -scheme is not passed then "Release" is used.

    Schemes:
        OpenGpxTracker
        OpenGpxTracker
        OpenGpxTracker-Watch
        OpenGpxTracker-Watch (Complication)
        OpenGpxTracker-Watch (Notification)

@vincentneo
Copy link
Collaborator

Saved `xcodebuild` log file: /var/folders/qy/hr8jkqt964z5y9h8jm7vt8ym0000gn/T/xcodebuild-8EE4A182-B4FD-4073-9AED-4979DA0302E2.log

Were there anything peculiar in the log file from this line?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants