swiftlang / swift-package-manager

The Package Manager for the Swift Programming Language
Apache License 2.0
9.67k stars 1.32k forks source link

[SR-12173] spm_mangledToBundleIdentifier doesn't fully support RFC 1034 #4605

Open hartbit opened 4 years ago

hartbit commented 4 years ago
Previous ID SR-12173
Radar rdar://problem/59496014
Original Reporter @hartbit
Type Task
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Package Manager | |Labels | Task | |Assignee | None | |Priority | Medium | md5: 675546aaad77d3b8963009928058ab0a

Issue Description:

Based on RFC 1034:

> The labels must follow the rules for ARPANET host names. They must start with a letter, end with a letter or digit, and have as interior characters only letters, digits, and hyphen. There are also some restrictions on the length. Labels must be 63 characters or less.

but `spm_mangledToBundleIdentifier` doesn't fix hyphens at the end of labels or labels that are more than 63 characters long.

beccadax commented 4 years ago

@swift-ci create