Skip to content

Conversation

d-ronnqvist
Copy link
Contributor

Bug/issue #, if applicable: rdar://120374614

Summary

This adds support for resolving links in a symbol's @DeprecationSummary content.

Previously the ReferenceResolver didn't visit a symbol's deprecatedSummaryVariants so any link in that content didn't resolve but also didn't warn about the links being unresolved.

Dependencies

None

Testing

In a documentation catalog with any symbol, add documentation extension file with a @DeprecationSummary directive that has a link in its content.

Build and preview the documentation. The deprecation summary should link to the other page.

Replace the link with something that won't resolve—for example ``NotFound``—and rebuild the documentation. There should be a warning about the unresolved link.

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran the ./bin/test script and it succeeded
  • [ ] Updated documentation if necessary

@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@sofiaromorales
Copy link
Contributor

@d-ronnqvist do you know if there's any reason why @DeprecationSummary is not listed as a directive in the DocC docs? https://www.swift.org/documentation/docc

@d-ronnqvist
Copy link
Contributor Author

@d-ronnqvist do you know if there's any reason why @DeprecationSummary is not listed as a directive in the DocC docs? https://www.swift.org/documentation/docc

I don't think there's a reason. Why probably my just forgot to list it.

@d-ronnqvist d-ronnqvist merged commit 8db2336 into swiftlang:main Jan 4, 2024
@d-ronnqvist d-ronnqvist deleted the links-in-deprecation-summary branch January 4, 2024 17:18
@sofiaromorales
Copy link
Contributor

@d-ronnqvist do you know if there's any reason why @DeprecationSummary is not listed as a directive in the DocC docs? https://www.swift.org/documentation/docc

I don't think there's a reason. Why probably my just forgot to list it.

can we add it as part of this pr?

@d-ronnqvist
Copy link
Contributor Author

@d-ronnqvist do you know if there's any reason why @DeprecationSummary is not listed as a directive in the DocC docs? https://www.swift.org/documentation/docc

I don't think there's a reason. Why probably my just forgot to list it.

can we add it as part of this pr?

I found that we do intentionally hide it from the documentation but I don't know why.

d-ronnqvist added a commit to d-ronnqvist/swift-docc that referenced this pull request Jan 5, 2024
* Support resolving links in @DeprecationSummary content

rdar://120374614

* Update year in header comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants