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

[6.1] Ensure that bundle identifiers are valid URL host components #1120

Merged

Conversation

d-ronnqvist
Copy link
Contributor

  • Explanation: This fixes a crash for certain developer input (see scope). The fix updates a lot of API to use strong types. This API change is a major reason for cherry picking, since other code on "main" will have the updated API.
  • Scope: Crash when the developer provided bundle identifier (either via Info.plist value, command line argument, or derived from catalog name) contains spaces or other characters that aren't valid URL host components.
  • Issue: rdar://135335645
  • Risk: Low.
  • Testing: New tests verify that developer provided input is transformed into valid URL host components.
  • Reviewer: @sofiaromorales
  • Original PR: Ensure that bundle identifiers are valid URL host components #1069

…ng#1069)

* Add bundle identifier type that ensures a valid URL host component

rdar://135335645

* Use new Identifier type in `DocumentationBundle/Info`

* Update code to not use deprecated `Info/identifier` property

* Use new Identifier type in `DocumentationBundle`

* Update code to not use deprecated `identifier` property

* Use new Identifier type in `[Unresolved|Resolved]TopicReference`

* Update code to not use deprecated topic reference `bundleIdentifier` property

* Deprecate `BundleIdentifier` in favor of `DocumentationBundle/Identifier`

* Use new Identifier type in `BuildMetadata`

* Use new Identifier type in `AssetReference`

* Use new Identifier type in `ResourceReference`

* Use new Identifier type in `ConvertServiceFallbackResolver`

* Use new Identifier type in `SerializableLinkResolutionInformation`

* Use new Identifier type in `ConvertAction/Indexer`

* Prefer `bundleID` over `id` for types that scoped inside bundle

* Use `bundleID` instead of `id` for property names outside the bundle

* Use "bundle id" in local variable in fallback resolver
@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist
Copy link
Contributor Author

@swift-ci please test

@d-ronnqvist d-ronnqvist merged commit ddc63c8 into swiftlang:release/6.1 Dec 10, 2024
2 checks passed
@d-ronnqvist d-ronnqvist deleted the validate-bundle-identifier-6.1 branch December 10, 2024 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants