Skip to content
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

Curating a module under a technology root causes the sidebar to not show Objective-C symbols #862

Open
2 tasks done
steviki opened this issue Mar 21, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@steviki
Copy link

steviki commented Mar 21, 2024

Description

When listing a module under a topics group in a technology root and supporting both Objective-C and Swift, the sidebar (and search) still only shows the Swift symbols even when switching the language to Objective-C.

Screenshot 2024-03-21 at 10 14 52

When removing the technology root, this works as expected, and the symbols in the sidebar switch correctly to Objective-C names when changing the language.

Screenshot 2024-03-21 at 10 14 35

Even adding @SupportedLanguage directives for both swift and objc doesn't fix this behavior.

Checklist

  • If possible, I've reproduced the issue using the main branch of this package.
  • This issue hasn't been addressed in an existing GitHub issue.

Expected Behavior

Switching the language to Objective-C should show the Objective-C symbols in the sidebar.

Actual behavior

Switching the language to Objective-C shows the Swift symbols in the sidebar.

Steps To Reproduce

This can be reproduced with the following project: SlothFramework.zip

This project contains a Swift file with a class that has a different name in Objective-C.

This project also contains a documentation catalog including a technology root page listing the framework this project produces in its topics group.

  1. From the unzipped project directory run the following command (make sure to update the path to the docc binary).
export DOCC_HTML_DIR="$(dirname $(xcrun --find docc))/../share/docc/render" && xcodebuild docbuild -project SlothFramework.xcodeproj -scheme SlothFramework -derivedDataPath docbuild-deriveddata -destination 'generic/platform=iOS' && ../swift-docc/.build/arm64-apple-macosx/debug/docc preview SlothFramework/SlothFramework.docc --fallback-bundle-version 1 --output-dir Sloth.doccarchive --additional-symbol-graph-dir docbuild-deriveddata/Build/Intermediates.noindex/SlothFramework.build/Debug-iphoneos/SlothFramework.build/symbol-graph
  1. Open the preview documentation in a browser and switch the language to Objective-C.
  2. See that the sidebar still shows the Swift symbols.

Swift-DocC Version Information

3e0c8e2

Swift Compiler Version Information

swift-driver version: 1.90.11.1 Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-macosx14.0
@steviki steviki added the bug Something isn't working label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant