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
[SR-2487] sourcekitd doesn't include __raw_doc_comment in structure #45092
Comments
SourceKitten has been affected by this change. |
Comment by David Potter (JIRA) This hurts our ability to enforce documentation on public definitions, including those frameworks that are targeted for external SDKs. |
Some visibility into the motivations for this change would be greatly appreciated. |
Comment by Mohamed Afifi (JIRA) I would love to get this back since it would be very helpful in linting tools like Swiftlint. |
Comment by Hristo Todorov (JIRA) It would be crucial for us to understand if something is going to replace the old attribute so we can still use lint tools. |
Comment by Stefan Herold (JIRA) I have trouble with SwiftLint too. It reports a lot of false positives because it cannot recognise already documented code anymore since this issue has arisen. |
Comment by Yen-Chia Lin (JIRA) I'm having issues with SwiftLint too. Produces lots of false positives, so I had to turn off that SwiftLint rule. I'm using Xcode 8.3.2 |
I've submitted a simple revert PR of the commit that removed this #9868 |
I've submitted a PR that adds `key.docoffset` and `key.doclength`: #11264 |
Thanks for doing this @marcelofabri! Do we know if this will be part of the Swift 4 release, or if it will come later? |
This was merged to master, so I don't think it'll be included in Swift 4. |
Additional Detail from JIRA
md5: 7cb28eacb8646ac198576beb5bef2cf8
Issue Description:
Previously (with Xcode 7.x) if you had a property with a docstring (like this):
And you got its structure for sourcekit (using sourcekitten) the output would look like this:
Notice this attribute:
With the Xcode 8.x betas, or building from the swift repo, the output for the same source now looks like this:
Which doesn't include the `__raw_doc_comment` attribute.
I also noticed that if I use the sourcekitd-repl and pass `key.enablesyntaxmap: 1`, it does provide some information about the doccomment:
But it is in a top level array of elements, and not directly associated with the key that it's documenting.
Is this new behavior expected? Or is this a bug?
The text was updated successfully, but these errors were encountered: