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

optional force unwrap fails if target name contains special characters #944

Open
1 of 2 tasks
tayloraswift opened this issue Jun 10, 2024 · 0 comments
Open
1 of 2 tasks
Labels
bug Something isn't working

Comments

@tayloraswift
Copy link
Member

tayloraswift commented Jun 10, 2024

Description

some characters such as space cannot be encoded in a URL host name, even with percent encoding. this causes optional force unwrap of the URL to fail at runtime, causing a DocC preview crash.

it can be reproduced on Linux by running the command below on this commit of the test package tayloraswift/snippets-example@968f351

swift package --disable-sandbox preview-documentation --target Snippets\ Example

@Kyle-Ye followed these steps, changing the manifest for macOS compatibility, and took this screenshot from a debugger:

image

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.

Swift-DocC Version Information

Plugin version 1.3.0

Swift Compiler Version Information

Swift version 5.10 (swift-5.10-RELEASE)
Target: x86_64-unknown-linux-gnu
@tayloraswift tayloraswift added the bug Something isn't working label Jun 10, 2024
@tayloraswift tayloraswift changed the title optional force unwrap fails if package manifest name contains special characters optional force unwrap fails if target name contains special characters Jun 10, 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