Skip to content

Support for specifying a branch for a dependency. #236

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

Closed
wants to merge 2 commits into from
Closed

Support for specifying a branch for a dependency. #236

wants to merge 2 commits into from

Conversation

ulrikdamm
Copy link

In a Package dependency, you can now specify an optional branch, and this branch will get cloned when getting dependencies.
It currently defaults to "master" if not specified (and will use 'git clone -b master').
Currently the branch will not influence the package name, but the name and tag should be enough that it doesn't conflict.

@aciidgh
Copy link
Contributor

aciidgh commented Apr 4, 2016

I don't know if this is desirable....have you looked at the ongoing lockfile proposal which aims to solve problems like this?

@kostiakoval
Copy link
Contributor

This will be solved with Lock file. Please have a look at Lock proposal draft.
https://github.com/mxcl/swift-evolution/blob/lockfiles/proposals/NNNN-swiftpm-dependency-lockfiles.md

@ulrikdamm
Copy link
Author

Most package managers seems to have a feature like this. I needed it myself to use the Swift 3.0 branch of a library.
It's not immediately clear to me how the current lockfile proposal solves this issue, but if it does, then I guess there's no need for this.

@aciidgh
Copy link
Contributor

aciidgh commented Apr 4, 2016

Under current proposal once you add a dependency, you can go into that package and git checkout the branch you want to use and "lock" it in order to propagate the changed branch to other users of your package.

@ulrikdamm ulrikdamm closed this Apr 14, 2016
aciidgh pushed a commit to aciidgh/swift-package-manager that referenced this pull request Jan 11, 2019
)

This reverts commit 17e8e68 because the
`insert()` is actually rewriting the array for every single discovered
dependency. This can cause a significant performance hit.

See <rdar://problem/38225211>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants