Xcode can't view code generated by Swift Package Plugins

When using a Swift Build Plugin, the generated code definitions are available through autocomplete, but it is currently not possible to view them directly in Xcode using Option+click.

An example of such a plugin is swift-openapi-generator.

According to information from "Meet Swift Package plugins" from WWDC22 the generated code is stored with other build artifacts.

It would be immensely helpful if there was support for viewing these intermediate files in read-only mode using Option+click. Currently, I have to resort to opening these files through Finder, or opening the project in VS Code where viewing the generated files using Cmd+click works without a problem.

Am I missing something? If not, it seems like a big oversight that this is not supported to the same extent in Apple's own tools.

Answered by mopacic in 867403022

UPDATE: Nevermind, the feature to view the files in read-only mode is there, I just encountered an issue with the way the project in question was modularized and how the swift-openapi-generator was configured.

Accepted Answer

UPDATE: Nevermind, the feature to view the files in read-only mode is there, I just encountered an issue with the way the project in question was modularized and how the swift-openapi-generator was configured.

Xcode can't view code generated by Swift Package Plugins
 
 
Q