tomaz / appledoc

Objective-c code Apple style documentation set generator.
http://gentlebytes.com
4.19k stars 644 forks source link

Xcode 9.3 beta 3 does not contain docsetutil #628

Closed jmoody closed 6 years ago

jmoody commented 6 years ago

Reproduce

Requires Xcode 9.3 beta 3 (only available on High Sierra)

$ xcrun xcodebuild -version
Xcode 9.3
Build version 9Q117m

$ cd appledoc; git checkout master; git pull
$ ./install-appledoc.sh -b ../DeviceAgent.iOS/bin -t ../DeviceAgent.iOS/.appledoc

$ DeviceAgent.iOS/bin/appledoc \
   --install-docset \    # Fails with or without this flag
   < other args >

Expected

appledoc to generate docs and exit with 0

Found

ERROR | !> xcrun: error: unable to find utility "docsetutil", not a developer tool or in PATH
WARN | docsetutil failed to index the documentation set, continuing with what was indexed...
Generation step 4/4 failed: GBDocSetInstallGenerator failed generating output, aborting!
Documentation set was installed, but couldn't reload documentation within Xcode.
Expected end of line but found identifier.
ERROR: Failed to create documentation

Analysis

$ DEVELOPER_DIR=/Xcode/9.2/Xcode.app/Contents/Developer xcrun -f docsetutil
/Xcode/9.2/Xcode.app/Contents/Developer/usr/bin/docsetutil

$ DEVELOPER_DIR=/Xcode/9.3/Xcode-beta.app/Contents/Developer xcrun -f docsetutil
xcrun: error: unable to find utility "docsetutil", not a developer tool or in PATH
x43x61x69 commented 6 years ago

9.3 GM version from the Mac App Store also missing this tool.

tomaz commented 6 years ago

Support for custom docsets is slowly getting away with time, seems like Xcode 9.3 cuts the chord... You can try to just generate docset, without installing (though expect it'll produce same results). Creating html should not be affected though...

x43x61x69 commented 6 years ago

Seems not just docsetutil was removed but DADocSetAccess.framework as well.

Tested with options:

--create-html \
--no-create-docset \
--no-install-docset \
--no-publish-docset \

which can create htmls w/o error on Xcode 9.3 GM.

tomaz commented 6 years ago

I suppose it was all handled by the same library behind the scenes. Unfortunately it seems docsets are not direction going forward for Apple. On the other hand, Xcode gained ability to gather and show documentation live from comments, so there's no need for docsets either.

gy37 commented 6 years ago

same question

irobbin1024 commented 6 years ago

same question too

Xcode 9.3(9E145) App Store version

tomaz commented 6 years ago

Well, the only thing we can really do about this is to open radars asking for this functionality to get back with future versions of Xcode... Perhaps custom implementation of docsetutils would work for the moment, but don't think it's worth investing time in it, as Xcode may lose ability to load docsets as all. It certainly seems this way. Besides, I think showing live comments is better solution overall and works for 3rd party libraries too.

priyankamistry09 commented 6 years ago

I am still facing this issue in XCode 9.4.1. Any update on this?

tomaz commented 6 years ago

No update. Once Apple changes direction, there's not much we can do. I didn't find a workaround either, so my comment above still holds...

asmagill commented 5 years ago

I know this is a closed issue, but for what it's worth, I was able to work around this by downloading the old docsetutil command and framework linked to at https://github.com/Kapeli/Dash-User-Contributions/pull/1884

Don't know how long it will continue to work, but for the moment it lets me continue to use appledoc to create docsets.

tomaz commented 5 years ago

Oh, nice! Didn't occur to me this would work, but good catch!

chinmaygarde commented 4 years ago

I wrote a tool that converts Doxygen documentation to Dash Docsets. Downloading an old version of Xcode was a hassle and I wanted to be able to generate documentation on a Linux VM instance anyway. Hope others find it useful https://github.com/chinmaygarde/doxygen2docset

tmcguire commented 3 years ago

Perhaps --no-create-docset should be the default, as generating docsets doesn't work out of the box?