apple / swift-package-manager

The Package Manager for the Swift Programming Language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ability to "check in" swift packages.

scott-lydon opened this issue · comments

Description

With Cocoapods we have the ability to track dependencies with git and so we can "Check in" the dependencies into our own project. This saves developers from frequently updating dependencies, or face "bugs" for forgetting to update their dependencies.

Expected behavior

I want to be able to track swift package dependencies, and see them when I open up programs like terminal and sourcetree.

Actual behavior

I don't see swift package manager dependencies available to "check-in"

Steps to reproduce

  1. Clone a repo
  2. Import any swift package.
  3. Open up source tree, and observe the changes are not tracked.

Swift Package Manager version/commit hash

No response

Swift & OS version (output of swift --version && uname -a)

No response

My StackOVerflow inquiry

+1 I would like to a see a swift package vendor command. @DougGregor is this something we could build with the new package manifest editing support, e.g. a CLI and LSP action to vendor a dependency? (There's probably a bit more to it with for still being able to update the vendored package)

It's fairly easy to introduce new packages manifest editing commands with the infrastructure we have. I don't quite know what you want out of "swift package vendor" in terms of other changes (copying in sources? Changing target dependencies?) that might be tricky.