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-15616] Inconsistent validation of local package path in SwiftPM #4367

Open
stackotter opened this issue Dec 18, 2021 · 1 comment
Open

[SR-15616] Inconsistent validation of local package path in SwiftPM #4367

stackotter opened this issue Dec 18, 2021 · 1 comment
Labels

Comments

@stackotter
Copy link

@stackotter stackotter commented Dec 18, 2021

Previous ID SR-15616
Radar None
Original Reporter @stackotter
Type Bug
Environment

Xcode Version 13.2 (13C90)

swift-driver version: 1.26.21 Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)

Target: x86_64-apple-macosx12.0

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

md5: bb0eb88610d50cf42613003444078194

Issue Description:

I am developing an app which is a Swift package. Building it using swift build works completely fine. However, when I include it as a dependency in another package, building that package fails with the following error:

invalidManifestFormat("'./Sources/Core' is not a valid path for path-based dependencies; use relative or absolute path instead.", diagnosticFile: nil) in https://github.com/stackotter/delta-client.

The path that is causing the error is valid when building the delta-client package, but not when delta-client is a dependency.

Here is an example Package.swift that results in the aforementioned error:

// swift-tools-version:5.5

import PackageDescription

let package = Package(
  name: "BugReproducer",
  dependencies: [
    .package(name: "DeltaClient", url: "https://github.com/stackotter/delta-client", .branch("refactor-rendering")),
  ],
  targets: [
    .executableTarget(
      name: "BugReproducer",
      dependencies: [
        .product(name: "StaticShim", package: "DeltaClient")
      ]),
  ]
)
@stackotter
Copy link
Author

@stackotter stackotter commented Dec 18, 2021

Removing the ./ does stop the error, but the inconsistency is a bit odd.

@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
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