You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble getting jazzy to generate documentation for my SPM-based library. Here is an example to reproduce the issue using a vanilla Swift package:
% sw_vers
ProductName: macOS
ProductVersion: 14.4.1
BuildVersion: 23E224
% ruby -v
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin23]
% jazzy -v
jazzy version: 0.14.4
% mkdir SwiftPackage
% cd SwiftPackage
% swift package init
Creating library package: SwiftPackage
Creating Package.swift
Creating .gitignore
Creating Sources/
Creating Sources/SwiftPackage/SwiftPackage.swift
Creating Tests/
Creating Tests/SwiftPackageTests/
Creating Tests/SwiftPackageTests/SwiftPackageTests.swift
% swift build
Building for debugging...
[4/4] Compiling SwiftPackage SwiftPackage.swift
Build complete! (1.34s)
% jazzy
Running swift build
Could not find SPM module '(any)'. Here are the modules available:
Error: Failed to generate documentation
/*/.gem/gems/jazzy-0.14.4/lib/jazzy/executable.rb:39:in `execute_command': /*/.gem/gems/jazzy-0.14.4/bin/sourcekitten ["doc", "--spm", "--"] (RuntimeError)
Running swift build
Could not find SPM module '(any)'. Here are the modules available:
Error: Failed to generate documentation
from /*/.gem/gems/jazzy-0.14.4/lib/jazzy/sourcekitten.rb:269:in `run_sourcekitten'
from /*/.gem/gems/jazzy-0.14.4/lib/jazzy/doc_builder.rb:82:in `block in build'
from /*/.gem/gems/jazzy-0.14.4/lib/jazzy/doc_builder.rb:80:in `chdir'
from /*/.gem/gems/jazzy-0.14.4/lib/jazzy/doc_builder.rb:80:in `build'
from /*/.gem/gems/jazzy-0.14.4/bin/jazzy:16:in `<top (required)>'
from /*/.gem/bin/jazzy:25:in `load'
from /*/.gem/bin/jazzy:25:in `<main>'
I also tried
% jazzy -m SwiftPackage
Running swift build
Could not find SPM module 'SwiftPackage'. Here are the modules available:
Error: Failed to generate documentation
/*/.gem/gems/jazzy-0.14.4/lib/jazzy/executable.rb:39:in `execute_command': /*/.gem/gems/jazzy-0.14.4/bin/sourcekitten ["doc", "--spm", "--module-name", "SwiftPackage", "--"] (RuntimeError)
Running swift build
Could not find SPM module 'SwiftPackage'. Here are the modules available:
Error: Failed to generate documentation
from /*/.gem/gems/jazzy-0.14.4/lib/jazzy/sourcekitten.rb:269:in `run_sourcekitten'
from /*/.gem/gems/jazzy-0.14.4/lib/jazzy/doc_builder.rb:82:in `block in build'
from /*/.gem/gems/jazzy-0.14.4/lib/jazzy/doc_builder.rb:80:in `chdir'
from /*/.gem/gems/jazzy-0.14.4/lib/jazzy/doc_builder.rb:80:in `build'
from /*/.gem/gems/jazzy-0.14.4/bin/jazzy:16:in `<top (required)>'
from /*/.gem/bin/jazzy:25:in `load'
from /*/.gem/bin/jazzy:25:in `<main>'
with similar results. I also tried invoking sourcekitten directly to try and narrow things down but wasn't able to get it working.
The only custom ruby-related setup I have are the following lines in .zshrc:
Jazzy (sourcekitten) doesn't support that yet due to incompatible changes in SwiftPM. Fixes are backed up behind Github actions supporting Xcode 15.3 - should be soon.
Thank you for this project!
I'm having trouble getting jazzy to generate documentation for my SPM-based library. Here is an example to reproduce the issue using a vanilla Swift package:
I also tried
with similar results. I also tried invoking
sourcekitten
directly to try and narrow things down but wasn't able to get it working.The only custom ruby-related setup I have are the following lines in
.zshrc
:The text was updated successfully, but these errors were encountered: