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

Differentiate between "Project name" and "module name" #411

Closed
1ec5 opened this issue Dec 7, 2015 · 7 comments
Closed

Differentiate between "Project name" and "module name" #411

1ec5 opened this issue Dec 7, 2015 · 7 comments

Comments

@1ec5
Copy link
Collaborator

1ec5 commented Dec 7, 2015

I’m migrating an Objective-C framework from appledoc to jazzy (mapbox/mapbox-gl-native#3203). The framework’s full name is “Mapbox iOS SDK”, while the actual module name that you import is simply Mapbox. Based on jazzy’s default templates, the full name seems like the most appropriate value for module_name. But if module_name contains spaces, the following error occurs:

/usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/uri/generic.rb:1100:in `rescue in merge': bad URI(is not URI?): docsets/Mapbox iOS SDK.tgz (URI::InvalidURIError)
    from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/uri/generic.rb:1097:in `merge'
    from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/uri/rfc3986_parser.rb:88:in `each'
    from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/uri/rfc3986_parser.rb:88:in `inject'
    from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/uri/rfc3986_parser.rb:88:in `join'
    from /usr/local/Cellar/ruby/2.2.3/lib/ruby/2.2.0/uri/common.rb:264:in `join'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jazzy-0.4.1/lib/jazzy/docset_builder.rb:89:in `block in create_xml'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jazzy-0.4.1/lib/jazzy/docset_builder.rb:88:in `open'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jazzy-0.4.1/lib/jazzy/docset_builder.rb:88:in `open'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jazzy-0.4.1/lib/jazzy/docset_builder.rb:88:in `create_xml'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jazzy-0.4.1/lib/jazzy/docset_builder.rb:33:in `build!'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jazzy-0.4.1/lib/jazzy/doc_builder.rb:130:in `build_docs_for_sourcekitten_output'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jazzy-0.4.1/lib/jazzy/doc_builder.rb:68:in `build'
    from /usr/local/lib/ruby/gems/2.2.0/gems/jazzy-0.4.1/bin/jazzy:15:in `<top (required)>'
    from /usr/local/bin/jazzy:23:in `load'
    from /usr/local/bin/jazzy:23:in `<main>'
make: *** [ipackage] Error 1
1ec5 added a commit to 1ec5/jazzy that referenced this issue Dec 7, 2015
@1ec5 1ec5 mentioned this issue Dec 7, 2015
@1ec5
Copy link
Collaborator Author

1ec5 commented Dec 7, 2015

#412 fixes this error. However, jazzy should probably have a separate name flag for the framework’s full name, independent of the module name.

@1ec5
Copy link
Collaborator Author

1ec5 commented Dec 7, 2015

The workaround is to specify the actual module name (without spaces) in module_name, then replace every instance of module_name in the templates and optionally move the generated docset via a shell script. But I think it's common enough for a framework to have a different "common name" and module name.

@nlutsenko
Copy link
Contributor

+1 Module name and framework name probably should be separate.
Example: Parse iOS SDK - full docset name and Parse - module name.

@jpsim
Copy link
Collaborator

jpsim commented Dec 8, 2015

Yes, I agree that we should differentiate between "project name" and "module name". I'll update this issue to track that.

@jpsim jpsim changed the title Error creating docset when module_name has spaces Differentiate between "Project name" and "module name" Dec 8, 2015
@pigeon-archive pigeon-archive self-assigned this Nov 23, 2016
@pigeon-archive
Copy link
Contributor

Any progress on this since Dec 2015?

@jpsim
Copy link
Collaborator

jpsim commented Nov 26, 2016

doesn't look like it

@johnfairh
Copy link
Collaborator

Fixed in master via #1077

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

No branches or pull requests

5 participants