Xcode cannot resolve DocC snippet reference

Originator:darren.mo
Number:rdar://FB13482049 Date Originated:2023-12-20
Status:Open Resolved:
Product:Xcode Product Version:Xcode Version 15.1 (15C65)
Classification:Incorrect/Unexpected Behavior Reproducible:Always
 
First, download and open the `swift-markdown` package in Xcode.
```
$ git clone https://github.com/apple/swift-markdown.git
$ open swift-markdown/Package.swift
```

In Xcode, invoke Product > Build Documentation. The documentation is built, but Xcode shows many warnings in `swift-markdown/Sources/Markdown/Markdown.docc/Snippets.md`. On every `@Snippet` reference, Xcode warns that `'swift-markdown' doesn't exist at '/Markdown/Snippets’`.

Running the following command succeeds without similar warnings: `swift package --build-system xcode --disable-sandbox preview-documentation --target Markdown --port 8081`.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!