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

Jazzy fails when compiling a coreml model, due to double quoting the swift version. #970

Closed
galli-leo opened this issue May 11, 2018 · 3 comments
Labels

Comments

@galli-leo
Copy link

galli-leo commented May 11, 2018

I have a framework that includes some coreml models. Unfortunately, jazzy fails to build the documentation. Xcode build log shows the following:

=== BUILD TARGET NemosyneSDK OF PROJECT Pods WITH THE DEFAULT CONFIGURATION (Release) ===

Check dependencies
Error preparing CoreML model "classifier.mlmodel" for code generation: coremlcompiler: Error: unrecognized Swift version ""4.0"".  Expected one of: 3.0, 3.1, 3.2 or 4.0
coremlcompiler: Error: usage: coremlcompiler <command> <inputdocument> <outputpath> [options ...]

Error preparing CoreML model "sphereface.mlmodel" for code generation: coremlcompiler: Error: unrecognized Swift version ""4.0"".  Expected one of: 3.0, 3.1, 3.2 or 4.0
coremlcompiler: Error: usage: coremlcompiler <command> <inputdocument> <outputpath> [options ...]

Seems like instead of setting SWIFT_VERSION="{VERSION}" it should be SWIFT_VERSION={VERSION}:

/usr/local/lib/ruby/gems/2.4.0/gems/jazzy-0.9.2/bin/sourcekitten ["doc", "--module-name", "NemosyneSDK", "--", "-target", "NemosyneSDK", "SWIFT_VERSION\\=\\\"4.0\\\""]

This also happens if I manually specify the swift version with --swift-version.

@johnfairh johnfairh added the bug label May 11, 2018
@johnfairh
Copy link
Collaborator

One set of the double quotes is from the error message itself. The problem is the other apple tools support (one set of) double quotes here -- I'm guessing they were required at some point in the past which is why they were added. Can you use the non---podspec invocation of jazzy for your project?

[hmm we should probably support the new[ish] cocoapods swift_version DSL as well...]

@galli-leo
Copy link
Author

Can confirm that compilation works without the podspec.

@1ec5
Copy link
Collaborator

1ec5 commented Sep 17, 2018

#1004 fixes this issue in a minimal way. It doesn’t adopt CocoaPods’ swift_version option.

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

3 participants