Closed sreedhargs89 closed 8 years ago
Any update on this issue...?
No
The problem was caused by the fact that the server machines have spotlight indexing disabled while it was enabled on the Macbook.
Hence, line 36 in xcode.rb of the XCInvoke gem fails:
xcodes, = Open3.capture2('mdfind', "kMDItemCFBundleIdentifier == 'com.apple.dt.Xcode'", err: '/dev/null')
The mdfind
command relies on the spotlight metadata store which needs spotlight indexing to be enabled. Otherwise it won't find any Xcode versions.
Any suggestion how we can fix the problem? My first two ideas would be: 1) Getting the XCode paths without spotlight 2) Providing a command line parameter that specifies the XCode location
Great thanks 👍
We are trying to generate the documents for Swift2.2 using Jazzy with Xcode7.3. We have 2 environments: Local dev environment (Macbook) and Server machine for central build.
We have exactly same set up in both machine like Xcode,CommandLine tools,Ruby but in server Jazzy fails with the below error:
Forums suggested to use the
--swift-version 2.2
but this didn't work for me.. :(I further tried to debug the issue by looking into jazzy/gems/jazzy-0.5.0/lib/jazzy/sourcekitten.rb:137 file
Line 137: def self.run_sourcekitten(arguments) swift_version = Config.instance.swift_version unless xcode = XCInvoke::Xcode.find_swift_version(swift_version) raise "Unable to find an Xcode with swift version #{swift_version}." end bin_path = Pathname(__FILE__).parent + 'SourceKitten/bin/sourcekitten' output, = Executable.execute_command(bin_path, arguments, true, env: xcode.as_env) output end
Here it looks value of "xcode" is nil and jazzy unable to find the xcode with swift2.2
FYI:
Your help really appreciated.