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

Diagnose invalid characters in bundle identifiers #290

Open
franklinsch opened this issue Jun 10, 2022 · 7 comments · May be fixed by #1012
Open

Diagnose invalid characters in bundle identifiers #290

franklinsch opened this issue Jun 10, 2022 · 7 comments · May be fixed by #1012
Labels
enhancement Improvements or enhancements to existing functionality good first issue Good for newcomers

Comments

@franklinsch
Copy link
Contributor

DocC should emit a diagnostic for bundle identifiers that contain characters that aren't valid in URL host (e.g., spaces).

Steps to Reproduce

Create a DocC catalog with a space in its bundle identifier. DocC doesn't produce a diagnostic, even though spaces aren't allowed in bundle identifiers because they're URL hosts.

Swift-DocC Version Information

Swift-DocC version: All

@franklinsch franklinsch added the bug Something isn't working label Jun 10, 2022
@sevki
Copy link

sevki commented Jun 16, 2022

this is also true for other unicode code points, for instance I have a function decl which looks like

public func 𝄞(@PitchBuilder _ makeAbsolutePitches: () -> [Pitch]) -> Track {
    Track(makeAbsolutePitches())
}

it doesn't work if you use

``𝄞(_:)``

docc will complain

/Users/sevki/src/Beato/Sources/Beato/Documentation.docc/Documentation.md:7:45: warning: Link destination '𝄞(_:)' is not a valid URL

which is a bit hand wavy, cause it can resolve that name to https://beato.sevki.dev/documentation/beato/_(_:) when it's enumerating functions.

TD;DR

Screenshot 2022-06-16 at 14 49 05

@franklinsch
Copy link
Contributor Author

Thanks for pointing this out @sevki! I believe this is an unrelated issue. @d-ronnqvist I believe you investigated something like this in the past?

@d-ronnqvist
Copy link
Contributor

Yes, the (unrelated) issue with unicode code points in symbol links is resolved on the 5.9 branch (which is included in the Xcode 15 betas).

@d-ronnqvist d-ronnqvist added good first issue Good for newcomers enhancement Improvements or enhancements to existing functionality and removed bug Something isn't working labels Dec 21, 2023
@agisilaos
Copy link

@franklinsch @d-ronnqvist I would love to work on this. Can you please give me some first pointers on where to look so I can try and fix the bug?

@agisilaos agisilaos linked a pull request Aug 21, 2024 that will close this issue
3 tasks
@agisilaos
Copy link

@franklinsch @d-ronnqvist Actually I decided to give it a go! Please let me know what you think: #1012

@d-ronnqvist
Copy link
Contributor

@agisilaos I'm happy to hear that you want to work on this. I didn't have time to provide any first pointers beforehand, but I tried to give some suggestions about where to start in #1012 (review). Don't hesitate to reach out if you have any questions.

@agisilaos
Copy link

@d-ronnqvist Thank you so much. I will take a look and fix all the issues you mentioned. Appreciate the thorough review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvements or enhancements to existing functionality good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants