Repository navigation
Conversation
SPI renders metadata.authors verbatim. The "Written by" prefix and the closing full stop are added only to the line it derives from the commit history, so the previous value would have shown up as a bare fragment next to the other sentences on the package page. Carry them in the value itself, and record why in a comment so the next edit keeps them. Verified against the server source: PackageResult.authors() reads defaultBranchVersion.spiManifest, and GetRoute.Model+ext authorsListItem() emits the manifest value as plain text while the git path wraps its nodes with listPhrase(opening: "Written by ", closing: ".").
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#65 set
metadata.authorstoKojiro Futamura and contributors, on the assumption that SPI would render it the same way it renders the line it derives from the commit history. It does not. The value becomes the whole line, so it would have appeared as a bare fragment among the sentences around it. The value now carries the prefix and the full stop itself:A comment above the key records why, so a future edit does not strip them again. The change has not reached the package page yet, so the first version anyone sees will be the correct one.
Why this is the rendering
From
SwiftPackageIndex-Serveronmain:Sources/App/Views/PackageController/GetRoute.Model+ext.swift,authorsListItem()— the manifest value goes out as plain text, while the git-derived path wraps its nodes:Packages in the index use the field as a free-form line, which matches:
vapor/vaporcarries a full sentence ending in a full stop, whilefirebase/firebase-ios-sdkandswiftlang/swift-testingcarry bare names (Google,Apple Inc.) that read fine on their own. A phrase like ours needs the verb.No release needed
Sources/App/Controllers/API/API+PackageController+PackageResult.swift,authors(), readsdefaultBranchVersion.spiManifest— the author line comes from the default branch only, never from a release:So merging to
mainis what puts this in front of SPI; tagging 4.0.3 would not make it land any sooner. That also corrects the expectation in #66: cutting 4.0.2 updated the Latest Release on the page, but it could never have advanced the author line. The changelog entry sits under Unreleased and will ship with whatever the next release turns out to be.Coordination
Matched with futamura/PunycodeSwift#91, which lands the identical value and comment.
Verification
.spi.ymlparses as YAML;metadata.authorsis 44 characters, well under the 200 SPI truncates at, and the file is 496 bytes against SPIManifest's 1500 byte limit.