When I do “swift build”, as expected the dependencies are downloaded into the Packages/ subfolder. I expect them to all be up to date, but they are all behind their origin/master repos. Why?
This is really a problem when I clone theses 4 projects and modify the dependencies to point to my clones. When I do that, the DeckOfPlayingCards project doesn’t download with my changes.
0 Wed 18:30:30 yost DaveBook ~/p/swift
421 Z% git clone git@github.com:apple/example-package-dealer.git
Cloning into 'example-package-dealer'...
remote: Counting objects: 21, done.
remote: Total 21 (delta 0), reused 0 (delta 0), pack-reused 21
Receiving objects: 100% (21/21), 7.03 KiB | 0 bytes/s, done.
Resolving deltas: 100% (8/8), done.
Checking connectivity... done.
0 Wed 18:30:40 yost DaveBook ~/p/swift
422 Z% cd example-package-dealer
0 Wed 18:30:42 yost DaveBook ~/p/swift/example-package-dealer
423 Z% swift build
Cloning GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager
HEAD is now at 0879cff Merge pull request #1 from kostiakoval/master
Resolved version: 1.0.4
Cloning GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager
HEAD is now at d3752ab Merge pull request #5 from contraultra/random-for-all
Resolved version: 1.1.0
Cloning GitHub - apple/example-package-playingcard: Example package for use with the Swift Package Manager
HEAD is now at 7986c83 Remove: `targets: `
Resolved version: 1.0.1
Compile Swift Module 'FisherYates' (2 sources)
Compile Swift Module 'PlayingCard' (3 sources)
Compile Swift Module 'DeckOfPlayingCards' (1 sources)
Compile Swift Module 'Dealer' (1 sources)
Linking .build/debug/Dealer
0 Wed 18:30:52 yost DaveBook ~/p/swift/example-package-dealer
424 Z% .build/debug/Dealer
︎7
♢A
A
︎Q
︎5
♢6
︎8
♢8
♢Q
︎4
0 Wed 18:30:59 yost DaveBook ~/p/swift/example-package-dealer
425 Z% cd Packages/PlayingCard-1.0.1
0 Wed 18:31:28 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
430 Z% git status
On branch 1.0.1
Your branch is behind 'origin/master' by 4 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:31:31 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
431 Z% git remote -v
origin GitHub - apple/example-package-playingcard: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-playingcard: Example package for use with the Swift Package Manager (push)
0 Wed 18:35:57 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
432 Z% cd ../FisherYates-1.1.0
0 Wed 18:36:19 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
433 Z% git status
On branch 1.1.0
Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:36:20 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
434 Z% git remote -v
origin GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager (push)
0 Wed 18:36:23 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
435 Z% cd ../DeckOfPlayingCards-1.0.4
0 Wed 18:36:46 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
436 Z% git status
On branch 1.0.4
Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:36:49 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
437 Z% git remote -v
origin GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager (push)
0 Wed 18:36:52 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
438 Z%
The swift package manager uses git tags to resolve the commit it’s going to get. So if you want to make your changes available to the package manager, you must tag your latest commit with a semantic versioning number (1.0.3 for instance) and explicitly put that as the version you want to fetch in your Package.swift file.
You can find more information on the swift project website
—H
···
On Jun 29, 2016, at 10:43 PM, Dave Yost via swift-users <swift-users@swift.org> wrote:
When I do “swift build”, as expected the dependencies are downloaded into the Packages/ subfolder. I expect them to all be up to date, but they are all behind their origin/master repos. Why?
This is really a problem when I clone theses 4 projects and modify the dependencies to point to my clones. When I do that, the DeckOfPlayingCards project doesn’t download with my changes.
0 Wed 18:30:30 yost DaveBook ~/p/swift
421 Z% git clone git@github.com:apple/example-package-dealer.git
Cloning into 'example-package-dealer'...
remote: Counting objects: 21, done.
remote: Total 21 (delta 0), reused 0 (delta 0), pack-reused 21
Receiving objects: 100% (21/21), 7.03 KiB | 0 bytes/s, done.
Resolving deltas: 100% (8/8), done.
Checking connectivity... done.
0 Wed 18:30:40 yost DaveBook ~/p/swift
422 Z% cd example-package-dealer
0 Wed 18:30:42 yost DaveBook ~/p/swift/example-package-dealer
423 Z% swift build
Cloning GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager
HEAD is now at 0879cff Merge pull request #1 from kostiakoval/master
Resolved version: 1.0.4
Cloning GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager
HEAD is now at d3752ab Merge pull request #5 from contraultra/random-for-all
Resolved version: 1.1.0
Cloning GitHub - apple/example-package-playingcard: Example package for use with the Swift Package Manager
HEAD is now at 7986c83 Remove: `targets: `
Resolved version: 1.0.1
Compile Swift Module 'FisherYates' (2 sources)
Compile Swift Module 'PlayingCard' (3 sources)
Compile Swift Module 'DeckOfPlayingCards' (1 sources)
Compile Swift Module 'Dealer' (1 sources)
Linking .build/debug/Dealer
0 Wed 18:30:52 yost DaveBook ~/p/swift/example-package-dealer
424 Z% .build/debug/Dealer
︎7
♢A
A
︎Q
︎5
♢6
︎8
♢8
♢Q
︎4
0 Wed 18:30:59 yost DaveBook ~/p/swift/example-package-dealer
425 Z% cd Packages/PlayingCard-1.0.1
0 Wed 18:31:28 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
430 Z% git status
On branch 1.0.1
Your branch is behind 'origin/master' by 4 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:31:31 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
431 Z% git remote -v
origin GitHub - apple/example-package-playingcard: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-playingcard: Example package for use with the Swift Package Manager (push)
0 Wed 18:35:57 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
432 Z% cd ../FisherYates-1.1.0
0 Wed 18:36:19 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
433 Z% git status
On branch 1.1.0
Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:36:20 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
434 Z% git remote -v
origin GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager (push)
0 Wed 18:36:23 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
435 Z% cd ../DeckOfPlayingCards-1.0.4
0 Wed 18:36:46 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
436 Z% git status
On branch 1.0.4
Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:36:49 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
437 Z% git remote -v
origin GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager (push)
0 Wed 18:36:52 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
438 Z%
On Jun 29, 2016, at 7:11 PM, Hugo Hennies via swift-users <swift-users@swift.org> wrote:
The swift package manager uses git tags to resolve the commit it’s going to get. So if you want to make your changes available to the package manager, you must tag your latest commit with a semantic versioning number (1.0.3 for instance) and explicitly put that as the version you want to fetch in your Package.swift file.
When I do “swift build”, as expected the dependencies are downloaded into the Packages/ subfolder. I expect them to all be up to date, but they are all behind their origin/master repos. Why?
This is really a problem when I clone theses 4 projects and modify the dependencies to point to my clones. When I do that, the DeckOfPlayingCards project doesn’t download with my changes.
0 Wed 18:30:30 yost DaveBook ~/p/swift
421 Z% git clone git@github.com:apple/example-package-dealer.git
Cloning into 'example-package-dealer'...
remote: Counting objects: 21, done.
remote: Total 21 (delta 0), reused 0 (delta 0), pack-reused 21
Receiving objects: 100% (21/21), 7.03 KiB | 0 bytes/s, done.
Resolving deltas: 100% (8/8), done.
Checking connectivity... done.
0 Wed 18:30:40 yost DaveBook ~/p/swift
422 Z% cd example-package-dealer
0 Wed 18:30:42 yost DaveBook ~/p/swift/example-package-dealer
423 Z% swift build
Cloning GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager
HEAD is now at 0879cff Merge pull request #1 from kostiakoval/master
Resolved version: 1.0.4
Cloning GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager
HEAD is now at d3752ab Merge pull request #5 from contraultra/random-for-all
Resolved version: 1.1.0
Cloning https://github.com/apple/example-package-playingcard.git
HEAD is now at 7986c83 Remove: `targets: `
Resolved version: 1.0.1
Compile Swift Module 'FisherYates' (2 sources)
Compile Swift Module 'PlayingCard' (3 sources)
Compile Swift Module 'DeckOfPlayingCards' (1 sources)
Compile Swift Module 'Dealer' (1 sources)
Linking .build/debug/Dealer
0 Wed 18:30:52 yost DaveBook ~/p/swift/example-package-dealer
424 Z% .build/debug/Dealer
︎7
♢A
A
︎Q
︎5
♢6
︎8
♢8
♢Q
︎4
0 Wed 18:30:59 yost DaveBook ~/p/swift/example-package-dealer
425 Z% cd Packages/PlayingCard-1.0.1
0 Wed 18:31:28 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
430 Z% git status
On branch 1.0.1
Your branch is behind 'origin/master' by 4 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:31:31 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
431 Z% git remote -v
origin https://github.com/apple/example-package-playingcard.git (fetch)
origin https://github.com/apple/example-package-playingcard.git (push)
0 Wed 18:35:57 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
432 Z% cd ../FisherYates-1.1.0
0 Wed 18:36:19 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
433 Z% git status
On branch 1.1.0
Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:36:20 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
434 Z% git remote -v
origin GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager (push)
0 Wed 18:36:23 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
435 Z% cd ../DeckOfPlayingCards-1.0.4
0 Wed 18:36:46 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
436 Z% git status
On branch 1.0.4
Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:36:49 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
437 Z% git remote -v
origin GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager (push)
0 Wed 18:36:52 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
438 Z%
On Jun 29, 2016, at 7:11 PM, Hugo Hennies via swift-users <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:
The swift package manager uses git tags to resolve the commit it’s going to get. So if you want to make your changes available to the package manager, you must tag your latest commit with a semantic versioning number (1.0.3 for instance) and explicitly put that as the version you want to fetch in your Package.swift file.
When I do “swift build”, as expected the dependencies are downloaded into the Packages/ subfolder. I expect them to all be up to date, but they are all behind their origin/master repos. Why?
This is really a problem when I clone theses 4 projects and modify the dependencies to point to my clones. When I do that, the DeckOfPlayingCards project doesn’t download with my changes.
0 Wed 18:30:30 yost DaveBook ~/p/swift
421 Z% git clone git@github.com:apple/example-package-dealer.git
Cloning into 'example-package-dealer'...
remote: Counting objects: 21, done.
remote: Total 21 (delta 0), reused 0 (delta 0), pack-reused 21
Receiving objects: 100% (21/21), 7.03 KiB | 0 bytes/s, done.
Resolving deltas: 100% (8/8), done.
Checking connectivity... done.
0 Wed 18:30:40 yost DaveBook ~/p/swift
422 Z% cd example-package-dealer
0 Wed 18:30:42 yost DaveBook ~/p/swift/example-package-dealer
423 Z% swift build
Cloning GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager
HEAD is now at 0879cff Merge pull request #1 from kostiakoval/master
Resolved version: 1.0.4
Cloning GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager
HEAD is now at d3752ab Merge pull request #5 from contraultra/random-for-all
Resolved version: 1.1.0
Cloning https://github.com/apple/example-package-playingcard.git
HEAD is now at 7986c83 Remove: `targets: `
Resolved version: 1.0.1
Compile Swift Module 'FisherYates' (2 sources)
Compile Swift Module 'PlayingCard' (3 sources)
Compile Swift Module 'DeckOfPlayingCards' (1 sources)
Compile Swift Module 'Dealer' (1 sources)
Linking .build/debug/Dealer
0 Wed 18:30:52 yost DaveBook ~/p/swift/example-package-dealer
424 Z% .build/debug/Dealer
︎7
♢A
A
︎Q
︎5
♢6
︎8
♢8
♢Q
︎4
0 Wed 18:30:59 yost DaveBook ~/p/swift/example-package-dealer
425 Z% cd Packages/PlayingCard-1.0.1
0 Wed 18:31:28 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
430 Z% git status
On branch 1.0.1
Your branch is behind 'origin/master' by 4 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:31:31 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
431 Z% git remote -v
origin https://github.com/apple/example-package-playingcard.git (fetch)
origin https://github.com/apple/example-package-playingcard.git (push)
0 Wed 18:35:57 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
432 Z% cd ../FisherYates-1.1.0
0 Wed 18:36:19 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
433 Z% git status
On branch 1.1.0
Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:36:20 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
434 Z% git remote -v
origin GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager (push)
0 Wed 18:36:23 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
435 Z% cd ../DeckOfPlayingCards-1.0.4
0 Wed 18:36:46 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
436 Z% git status
On branch 1.0.4
Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:36:49 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
437 Z% git remote -v
origin GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager (push)
0 Wed 18:36:52 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
438 Z%
I wouldn't say they are "unclean", but they have not been retagged after the latest commits to them, and you are right they probably should be. Feel free to file a bug on this at http://bugs.swift.org <Issues · apple/swift · GitHub.
- Daniel
···
On Jun 29, 2016, at 11:25 PM, Dave Yost <Dave@Yost.com> wrote:
Dumb questions:
These repos are not clean, tho, right? The head should be tagged with a version number, right?
On 2016-06-29, at 7:56 PM, Daniel Dunbar <daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com>> wrote:
On Jun 29, 2016, at 7:11 PM, Hugo Hennies via swift-users <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:
The swift package manager uses git tags to resolve the commit it’s going to get. So if you want to make your changes available to the package manager, you must tag your latest commit with a semantic versioning number (1.0.3 for instance) and explicitly put that as the version you want to fetch in your Package.swift file.
When I do “swift build”, as expected the dependencies are downloaded into the Packages/ subfolder. I expect them to all be up to date, but they are all behind their origin/master repos. Why?
This is really a problem when I clone theses 4 projects and modify the dependencies to point to my clones. When I do that, the DeckOfPlayingCards project doesn’t download with my changes.
0 Wed 18:30:30 yost DaveBook ~/p/swift
421 Z% git clone git@github.com:apple/example-package-dealer.git
Cloning into 'example-package-dealer'...
remote: Counting objects: 21, done.
remote: Total 21 (delta 0), reused 0 (delta 0), pack-reused 21
Receiving objects: 100% (21/21), 7.03 KiB | 0 bytes/s, done.
Resolving deltas: 100% (8/8), done.
Checking connectivity... done.
0 Wed 18:30:40 yost DaveBook ~/p/swift
422 Z% cd example-package-dealer
0 Wed 18:30:42 yost DaveBook ~/p/swift/example-package-dealer
423 Z% swift build
Cloning GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager
HEAD is now at 0879cff Merge pull request #1 from kostiakoval/master
Resolved version: 1.0.4
Cloning GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager
HEAD is now at d3752ab Merge pull request #5 from contraultra/random-for-all
Resolved version: 1.1.0
Cloning GitHub - apple/example-package-playingcard: Example package for use with the Swift Package Manager
HEAD is now at 7986c83 Remove: `targets: `
Resolved version: 1.0.1
Compile Swift Module 'FisherYates' (2 sources)
Compile Swift Module 'PlayingCard' (3 sources)
Compile Swift Module 'DeckOfPlayingCards' (1 sources)
Compile Swift Module 'Dealer' (1 sources)
Linking .build/debug/Dealer
0 Wed 18:30:52 yost DaveBook ~/p/swift/example-package-dealer
424 Z% .build/debug/Dealer
︎7
♢A
A
︎Q
︎5
♢6
︎8
♢8
♢Q
︎4
0 Wed 18:30:59 yost DaveBook ~/p/swift/example-package-dealer
425 Z% cd Packages/PlayingCard-1.0.1
0 Wed 18:31:28 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
430 Z% git status
On branch 1.0.1
Your branch is behind 'origin/master' by 4 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:31:31 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
431 Z% git remote -v
origin GitHub - apple/example-package-playingcard: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-playingcard: Example package for use with the Swift Package Manager (push)
0 Wed 18:35:57 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
432 Z% cd ../FisherYates-1.1.0
0 Wed 18:36:19 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
433 Z% git status
On branch 1.1.0
Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:36:20 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
434 Z% git remote -v
origin GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager (push)
0 Wed 18:36:23 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
435 Z% cd ../DeckOfPlayingCards-1.0.4
0 Wed 18:36:46 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
436 Z% git status
On branch 1.0.4
Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:36:49 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
437 Z% git remote -v
origin GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager (push)
0 Wed 18:36:52 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
438 Z%
Cloning these example-package-* repos and then filing pull requests for them is problematic because the github username “apple” is burned into the dependency urls in the Package.swift files.
It would be good if these packages would take a build-time argument for the github username, defaulting to “apple”. I thought this would do it, but it doesn’t work:
import Foundation
let githubUserVarName = "GITHUB_USER"
let env = ProcessInfo.processInfo().environment
let githubUser = env[githubUserVarName] ?? "apple"
print("env[\"\(githubUserVarName)\"] is \(env[githubUserVarName])")
but for some reason only a few environment variables are visible in the env dictionary. The GITHUB_USER environment variable is not among them.
Seems like a bug against “swift build”. Yes?
I wouldn't say they are "unclean", but they have not been retagged after the latest commits to them, and you are right they probably should be. Feel free to file a bug on this at http://bugs.swift.org <Issues · apple/swift · GitHub.
Done.
···
On 2016-06-29, at 11:26 PM, Daniel Dunbar <daniel_dunbar@apple.com> wrote:
- Daniel
On Jun 29, 2016, at 11:25 PM, Dave Yost <Dave@Yost.com <mailto:Dave@yost.com>> wrote:
Dumb questions:
These repos are not clean, tho, right? The head should be tagged with a version number, right?
On 2016-06-29, at 7:56 PM, Daniel Dunbar <daniel_dunbar@apple.com <mailto:daniel_dunbar@apple.com>> wrote:
On Jun 29, 2016, at 7:11 PM, Hugo Hennies via swift-users <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:
The swift package manager uses git tags to resolve the commit it’s going to get. So if you want to make your changes available to the package manager, you must tag your latest commit with a semantic versioning number (1.0.3 for instance) and explicitly put that as the version you want to fetch in your Package.swift file.
When I do “swift build”, as expected the dependencies are downloaded into the Packages/ subfolder. I expect them to all be up to date, but they are all behind their origin/master repos. Why?
This is really a problem when I clone theses 4 projects and modify the dependencies to point to my clones. When I do that, the DeckOfPlayingCards project doesn’t download with my changes.
0 Wed 18:30:30 yost DaveBook ~/p/swift
421 Z% git clone git@github.com:apple/example-package-dealer.git
Cloning into 'example-package-dealer'...
remote: Counting objects: 21, done.
remote: Total 21 (delta 0), reused 0 (delta 0), pack-reused 21
Receiving objects: 100% (21/21), 7.03 KiB | 0 bytes/s, done.
Resolving deltas: 100% (8/8), done.
Checking connectivity... done.
0 Wed 18:30:40 yost DaveBook ~/p/swift
422 Z% cd example-package-dealer
0 Wed 18:30:42 yost DaveBook ~/p/swift/example-package-dealer
423 Z% swift build
Cloning GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager
HEAD is now at 0879cff Merge pull request #1 from kostiakoval/master
Resolved version: 1.0.4
Cloning GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager
HEAD is now at d3752ab Merge pull request #5 from contraultra/random-for-all
Resolved version: 1.1.0
Cloning GitHub - apple/example-package-playingcard: Example package for use with the Swift Package Manager
HEAD is now at 7986c83 Remove: `targets: `
Resolved version: 1.0.1
Compile Swift Module 'FisherYates' (2 sources)
Compile Swift Module 'PlayingCard' (3 sources)
Compile Swift Module 'DeckOfPlayingCards' (1 sources)
Compile Swift Module 'Dealer' (1 sources)
Linking .build/debug/Dealer
0 Wed 18:30:52 yost DaveBook ~/p/swift/example-package-dealer
424 Z% .build/debug/Dealer
︎7
♢A
A
︎Q
︎5
♢6
︎8
♢8
♢Q
︎4
0 Wed 18:30:59 yost DaveBook ~/p/swift/example-package-dealer
425 Z% cd Packages/PlayingCard-1.0.1
0 Wed 18:31:28 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
430 Z% git status
On branch 1.0.1
Your branch is behind 'origin/master' by 4 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:31:31 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
431 Z% git remote -v
origin GitHub - apple/example-package-playingcard: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-playingcard: Example package for use with the Swift Package Manager (push)
0 Wed 18:35:57 yost DaveBook ~/p/swift/example-package-dealer/Packages/PlayingCard-1.0.1
432 Z% cd ../FisherYates-1.1.0
0 Wed 18:36:19 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
433 Z% git status
On branch 1.1.0
Your branch is behind 'origin/master' by 2 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:36:20 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
434 Z% git remote -v
origin GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-fisheryates: Example package for use with the Swift Package Manager (push)
0 Wed 18:36:23 yost DaveBook ~/p/swift/example-package-dealer/Packages/FisherYates-1.1.0
435 Z% cd ../DeckOfPlayingCards-1.0.4
0 Wed 18:36:46 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
436 Z% git status
On branch 1.0.4
Your branch is behind 'origin/master' by 3 commits, and can be fast-forwarded.
(use "git pull" to update your local branch)
nothing to commit, working directory clean
0 Wed 18:36:49 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
437 Z% git remote -v
origin GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager (fetch)
origin GitHub - apple/example-package-deckofplayingcards: Example package for use with the Swift Package Manager (push)
0 Wed 18:36:52 yost DaveBook ~/p/swift/example-package-dealer/Packages/DeckOfPlayingCards-1.0.4
438 Z%