Skip to content

[6.0] @DeprecationSummary not having effect for some symbols #985

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

Conversation

anferbui
Copy link
Contributor

  • Explanation: Fixes an issue where @DeprecationSummary would have no effect if a symbol had multiple lines of documentation comments in its source.
  • Scope: @DeprecationSummary directive.
  • Issue: rdar://70056350
  • Risk: Low.
  • Testing: Validated by rendering a documentation extension article for a symbol which was triggering the issue, plus unit testing (see original PR for more info).
  • Reviewer: @d-ronnqvist
  • Original PR: @DeprecationSummary not having effect for some symbols #982

@anferbui anferbui requested review from Teapane and franklinsch July 11, 2024 16:21
@anferbui
Copy link
Contributor Author

@swift-ci please test

When specifying the @DeprecationSummary directive in a symbol extension markdown file, the directive wasn't taking effect if the symbol had multiple lines of documentation comments.

This was happening because `DocumentationMarkup.deprecation` was only being populated in the abstract. This has now been updated to take an effect in the Discussion section as well.

* Make `@DeprecationSummary` have an effect in the Discussion section
* Add tests to verify `@DeprecationSummary` has effect in Discussion section
* Return early when `@DeprecationSummary` is detected. When we've parsed the `@DeprecationSummary` directive, no need to continue parsing, we can exit early.
* Use `XCTUnwrap` in DeprecationSummaryTests. `XCTUnwrap` is preferred over force-unwrapping or using `XCTFail` in tests.
* Remove `internal` keyword. It's not needed, `internal` is the default access level.

Resolves rdar://70056350.
@anferbui anferbui force-pushed the 6.0-deprecated-summary-not-having-effecr branch from f170564 to b510ce2 Compare July 12, 2024 09:30
@anferbui
Copy link
Contributor Author

@swift-ci please test

@anferbui anferbui merged commit d0d14fd into swiftlang:release/6.0 Jul 12, 2024
2 checks passed
@anferbui anferbui deleted the 6.0-deprecated-summary-not-having-effecr branch July 12, 2024 09:40
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