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

NSSet makes Jazzy forget the rest of the line #910

Closed
akac opened this issue Nov 15, 2017 · 8 comments
Closed

NSSet makes Jazzy forget the rest of the line #910

akac opened this issue Nov 15, 2017 · 8 comments
Labels

Comments

@akac
Copy link

akac commented Nov 15, 2017

Given our framework, we have this protocol line:

- (void)myObject:(nonnull MyManager *) myManager crossedLimitBoundariesWithExitedZones:(nullable NSSet <MyLimit *> *)exitedLimits enteredZones:(nullable NSSet <MyLimit *> *)enteredLimits;

Jazzy produces the following for Swift:

optional func myObject(_ myManager: MyManager, crossedLimitBoundariesWithExitedZones exitedLimits: Set

If I switch it to an NSArray (which obviously doesn't work for us since this SDK is already in use), Jazzy produces the correct HTML.

sdk: iphonesimulator
author: Me
author_url: http://developer.me.com
copyright: Me
module: MyProject
module_version: 3.1.0
theme: apple
readme: README.md
hide_documentation_coverage: true
umbrella_header: MyProject/MyProjectUmbrella.h
objc: true

Is this a Jazzy bug or is there a workaround that doesn't require changing the SDK itself?

@johnfairh
Copy link
Collaborator

Works for me on latest Jazzy + Xcode 9.1 / Xcode 9.0.1 (although I have to scroll right to see the whole line)
screen shot 2017-11-15 at 21 36 03
/
screen shot 2017-11-15 at 21 36 17

The truncation at the angle bracket sounds like some escaping not happening; be interesting to find out what you have xcode-selected -- was something similar with '&' during Xcode 9 ?beta. If the same as my test though then I think will need a complete minimal example to play with. Might be to do with how your other types are defined.

@akac
Copy link
Author

akac commented Nov 21, 2017

I was using Xcode 8 in this case because the framework we're building for is on Xcode 8. We have a newer version that's on Xcode 9, but that's not being released yet.

I'll try it on Xcode 9.1 and see if that improves. In my case - it wasn't a scrolling issue as I checked the actual HTML being generated.

@johnfairh
Copy link
Collaborator

I found an Xcode 8.0 install I'd forgotten about + this immediately recreated, it is a SourceKit bug to do with XML escapes that has been since fixed. Tentatively closing this issue - use Xcode 9. SourceKitten could probably work around this but it's not that pretty.

  ▿ 9 : 2 elements
    - key : "key.doc.full_as_xml"
    - value : "<Function isInstanceMethod=\"1\" file=\"/Users/johnf/project/ObjCTester/ObjCTester/Header.h\" line=\"33\" column=\"1\">
<Name>giveSet:</Name><USR>c:objc(cs)AClass(im)giveSet:</USR>
<Declaration>func give(_ theSet: Set<AClass>?)</Declaration><Abstract>
<Para> does NSSet work?</Para></Abstract></Function>"

@akac
Copy link
Author

akac commented Nov 28, 2017

I am using Xcode 9.1 - still same issue. Unless jazzy is somehow using Xcode 8 still - but I have my command line tools set to 9.1.

@johnfairh
Copy link
Collaborator

You're right, sorry about that! The Swift bug is still there in master. If you have a doc comment the XML escaping goes wrong; if you do not have a doc comment it is fine.

@jpsim
Copy link
Collaborator

jpsim commented Nov 29, 2017

Thanks for fixing this @johnfairh. Will you update SourceKitten here or would you like me to do that?

@johnfairh
Copy link
Collaborator

I will give it a shot.

@johnfairh
Copy link
Collaborator

Fixed in master.

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