Skip to content

Conversation

@AryanBagade
Copy link

Bug/issue #, if applicable: #1403

Summary

Previously, @PageImage directives were rejected when used in documentation comments with a warning suggesting to use a documentation extension file instead. This change removes that restriction, allowing developers to specify page images directly in their source code comments.

This aligns @PageImage behavior with @Available, which is already supported in documentation comments.

Implementation:

  • Removed validation that rejected @PageImage in Metadata.validateForUseInDocumentationComment()
  • Removed clearing of pageImages array for documentation comments

Dependencies

None.

Testing

  1. Build the project with swift build
  2. Run tests with swift test --filter SymbolTests
  3. Verify the new tests pass:
    • testParsesPageImageDirectiveFromDocComment
    • testParsesMultiplePageImageDirectivesFromDocComment

Checklist

  • Added tests
  • Ran the ./bin/test script and it succeeded
  • Updated documentation if necessary (N/A - no documentation changes needed)

Previously, @PageImage directives were rejected when used in documentation comments with a warning suggesting to use a documentation extension file instead. This change removes that restriction, allowing developers to specify page images directly in their source code comments.
@heckj
Copy link
Member

heckj commented Dec 22, 2025

@swift-ci please test

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