You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SR-6638 Occasionally need to rm -rf when changing dependencies
relates to:
SR-8380 Crash when a dependency depends on itself (cycle)
Issue Description:
I'm using Vapor for this example as that is what I was using originally.
Steps to reproduce:
1. `vapor new UpdateTest --template=api --branch=beta`
2. `vapor xcode` (not necessary I don't think but it is what I am using)
3. add `
.package(url: "https://github.com/vapor/auth.git", from: "2.0.0-rc.3.0.1"),` to your dependencies in `Package.swift` and add `Authentication` to the `App` target so it looks like the following:
```
// swift-tools-version:4.0
import PackageDescription
let package = Package(
name: "UpdateTest",
dependencies: \[
// A server-side Swift web framework.
.package(url: "https://github.com/vapor/vapor.git", from: "3.0.0-rc.2"),
// Swift ORM (queries, models, relations, etc) built on SQLite 3.
.package(url: "https://github.com/vapor/fluent-sqlite.git", from: "3.0.0-rc.2"),
.package(url: "https://github.com/vapor/auth.git", from: "2.0.0-rc.3.0.1"),
\],
targets: \[
.target(name: "App", dependencies: \["FluentSQLite", "Vapor", "Authentication"\]),
.target(name: "Run", dependencies: \["App"\]),
.testTarget(name: "AppTests", dependencies: \["App"\])
\]
)
```
4. Run `vapor update` (which runs swift package update), this should succeed
Environment
OSX 10.13.4, Xcode 9.3, Swift 4.1
Additional Detail from JIRA
md5: fa1505032d7fa87aec680daaf31990ae
duplicates:
rm -rf
when changing dependenciesrelates to:
Issue Description:
I'm using Vapor for this example as that is what I was using originally.
Steps to reproduce:
1. `vapor new UpdateTest --template=api --branch=beta`
2. `vapor xcode` (not necessary I don't think but it is what I am using)
3. add `
.package(url: "https://github.com/vapor/auth.git", from: "2.0.0-rc.3.0.1"),` to your dependencies in `Package.swift` and add `Authentication` to the `App` target so it looks like the following:
```
// swift-tools-version:4.0
import PackageDescription
let package = Package(
)
```
4. Run `vapor update` (which runs swift package update), this should succeed
5. Change the auth depedency to read `
.package(url: "https://github.com/Noobish1/auth.git", .branch("token-optional-fix")),` so your `Package.swift` looks like the following:
```
// swift-tools-version:4.0
import PackageDescription
let package = Package(
)
```
6. Run `vapor update` again
Expected result: `vapor update` should succeed and our dependencies should be updated
Actual result: `vapor update` fails with the following message:
```
Error: backgroundExecute(code: 1, error: "error: terminated(128): git -C '/Users/Blair/Documents/iPhone Development/UpdateTest/.build/checkouts/auth.git-9199502942084726963' checkout -f 8bc7cc84b6fe7b6767ace857acb0592216c92c90 output:\n \n\n", output: "Fetching https://github.com/Noobish1/auth.git\nUpdating https://github.com/vapor/vapor.git\nUpdating https://github.com/vapor/fluent-sqlite.git\nUpdating https://github.com/vapor/validation.git\nUpdating https://github.com/vapor/service.git\nUpdating https://github.com/vapor/crypto.git\nUpdating https://github.com/vapor/routing.git\nUpdating https://github.com/vapor/template-kit.git\nUpdating https://github.com/vapor/console.git\nUpdating https://github.com/vapor/engine.git\nUpdating https://github.com/vapor/core.git\nUpdating https://github.com/vapor/database-kit.git\nUpdating https://github.com/apple/swift-nio.git\nUpdating https://github.com/apple/swift-nio-zlib-support.git\nUpdating https://github.com/apple/swift-nio-ssl.git\nUpdating https://github.com/apple/swift-nio-ssl-support.git\nUpdating https://github.com/vapor/fluent.git\nUpdating https://github.com/vapor/sqlite.git\nResolving https://github.com/Noobish1/auth.git at token-optional-fix\n")
```
Running `swift package update` also fails with this error:
```
Updating https://github.com/Noobish1/auth.git
Updating https://github.com/vapor/fluent-sqlite.git
Updating https://github.com/vapor/vapor.git
Updating https://github.com/vapor/routing.git
Updating https://github.com/vapor/database-kit.git
Updating https://github.com/vapor/crypto.git
Updating https://github.com/vapor/console.git
Updating https://github.com/vapor/core.git
Updating https://github.com/vapor/engine.git
Updating https://github.com/vapor/service.git
Updating https://github.com/vapor/template-kit.git
Updating https://github.com/vapor/validation.git
Updating https://github.com/apple/swift-nio.git
Updating https://github.com/apple/swift-nio-zlib-support.git
Updating https://github.com/apple/swift-nio-ssl.git
Updating https://github.com/apple/swift-nio-ssl-support.git
Updating https://github.com/vapor/sqlite.git
Updating https://github.com/vapor/fluent.git
Resolving https://github.com/Noobish1/auth.git at token-optional-fix
error: terminated(128): git -C '/Users/Blair/Documents/iPhone Development/UpdateTest/.build/checkouts/auth.git-9199502942084726963' checkout -f 8bc7cc84b6fe7b6767ace857acb0592216c92c90 output:
```
The text was updated successfully, but these errors were encountered: