Skip to content

Error parsing the Package.swift file #505

@daveverwer

Description

@daveverwer

Description

Hello! I'm part of the Swift Package Index team and was just trying to add this package to the index. We use swift package dump-package to extract package metadata in as JSON but when running that command for this package, the following error occurs:

$ xcrun swift package dump-package
/Users/dave/Desktop/aws-sdk-swift: error: manifest parse error(s):
main/Package.swift:104: Fatal error: 'try!' expression unexpectedly raised an error: Error Domain=NSCocoaErrorDomain Code=260 "The folder “release” doesn’t exist." UserInfo={NSFilePath=/Users/dave/Projects/Amplify/SwiftSDK/aws-sdk-swift/release, NSUserStringVariant=(
    Folder
), NSUnderlyingError=0x600000a28090 {Error Domain=NSOSStatusErrorDomain Code=-43 "fnfErr: File not found"}}
error: invalid manifests at [<AbsolutePath:"/Users/dave/Desktop/aws-sdk-swift">]

This is broken on main but works on the 0.1.0 tag. Unfortunately, to add the package to the index we need to be able to initially run the dump-package on a checkout of the default branch.

Environment

  • AWS Swift SDK version used: This is broken on main but works on the 0.1.0 tag.
  • Operating System and version (iOS/macOS/Linux): macOS Monterey
  • Xcode version (if applicable): Version 13.1 (13A1030d)
  • Swift compiler version (if applicable): Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6)
  • Swift Tools version (if applicable): Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6)

Reproduction Steps

  • Check out the main branch of this repository locally.
  • Change into the checked out directory.
  • Run xcrun swift package dump-package

Observed Behavior

The manifest fails to parse.

Expected Behavior

The manifest parses successfully.


Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions