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

[SR-3797] [SwiftPM] Malformed Package.pins file crashes SwiftPM #5122

Closed
swift-ci opened this issue Jan 30, 2017 · 3 comments
Closed

[SR-3797] [SwiftPM] Malformed Package.pins file crashes SwiftPM #5122

swift-ci opened this issue Jan 30, 2017 · 3 comments
Labels

Comments

@swift-ci
Copy link
Contributor

Previous ID SR-3797
Radar None
Original Reporter Dave (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

macOS 10.11.6
$ swift --version
Apple Swift version 3.1-dev (LLVM 2475cd4a8a, Clang bbab01d581, Swift bf16b699c5)
Target: x86_64-apple-macosx10.9

Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: 5b704524362a6943e3e55171ea99e8e8

Issue Description:

If the outer-most "version" field of a .pins file is set to 0 (see the 2nd-to-last line of the attached "Malformed Package.pins" file), SwiftPM will crash when "swift package update", "swift package fetch", "swift build", or "swift package generate-xcodeproj" is run.

The first line is always "fatal error: Migration not supported yet: file /Users/buildnode/jenkins/workspace/oss-swift-package-osx/swiftpm/Sources/Workspace/PinsStore.swift, line 156". As far as I can tell, the rest the messages are the same, too, except for lines 15-17 (15-16 for "swift package update", because its output has one less line than the others).

@swift-ci
Copy link
Contributor Author

Comment by David Sweeris (JIRA)

Oh, hey, looks like there's already a fixme in the source code.

@ankitspd
Copy link
Member

ankitspd commented Feb 1, 2017

pins file is not supposed to be edited by hand but we should not crash and emit diagnostics.

@ankitspd
Copy link
Member

Fixed by 69c274d

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants