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-4261] Pin command doesn't work properly if a package is in edit mode #5067

aciidb0mb3r opened this issue Mar 16, 2017 · 4 comments


Copy link

@aciidb0mb3r aciidb0mb3r commented Mar 16, 2017

Previous ID SR-4261
Radar rdar://problem/31085711
Original Reporter @aciidb0mb3r
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Package Manager
Labels Bug, StarterBug
Assignee @heckj
Priority Medium

md5: 291b8915ccc0f9d6e0ad67177b01e361

Issue Description:

We're not setting the constraints properly when the pin subcommand is run, we need to add constraints of the edited packages like we do in update command.

Copy link
Member Author

@aciidb0mb3r aciidb0mb3r commented Mar 16, 2017

@swift-ci create

Copy link

@heckj heckj commented Mar 16, 2017

So, its the problem is: when there is an edited dependency, the pin command simply fails.
if a package foo has two dependencies: bar and baz.
this sequence of commands fail:
swift package edit bar
swift package pin baz --version 1.0.0
assuming baz has two versions 1.0.0 and 1.0.1
the problem is that we are not putting proper constraints for edited packages.

Yes, so this is the updateDependencies method which does the right thing:
i.e. it adds the constraints for edited packages
but we're missing these constraints in pin method:

Copy link

@heckj heckj commented Mar 17, 2017

Reproduced this issue, with current ToT swift-package output of the `swift pin` command following the `swift edit` command was `error: terminated(128): git -C /Users/heckj/src/foofixture/.build/checkouts/BarFixture remote update -p`

Copy link

@heckj heckj commented Mar 17, 2017

work in progress: #1023

@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
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants