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
I have multiple Xcode projects in a single workspace. Each project has one or more targets, and each target has a unique set of Swift package dependencies.
The docs for this tool indicate that it might only get you the dependencies for a project, swift-package-list <project-path>; is there a possibility of getting dependencies for a specific target as well?
Possibly related, I get the following error when trying to run the command:
> swift-package-list MyApp.xcodeproj
Error: The file “Package.resolved” couldn’t be opened because there is no such file.
Notably, I am using Xcode's UI to manage all of my Swift package dependencies.
The text was updated successfully, but these errors were encountered:
Let me clarify things a bit: this tool relies on the contents of Package.resolved; depending on which kind of project you have (Xcode project/workspace, Swift package, Tuist project) this file is located in various places. Once you add a Xcode project to a workspace the workspace manages SPM so you have to run the tool with the workspace path, e.g. swift-package-list Test.xcworkspace.
Now to your actual question if you can configure it to filter by target: This information is not part of the Package.resolved, the only reliable method would be to parse project.pbxproj AFIAK. In the case of a workspace it is not even project specific, the Package.resolved will contain the packages from all the workspace's projects. So to answer it, no it is not possible and it would also not be a simple addition (not sure how easy it is to parse the project file, but if you think about sub-dependencies which are not declared at all and SPM plugins things get quiet complex).
I have multiple Xcode projects in a single workspace. Each project has one or more targets, and each target has a unique set of Swift package dependencies.
The docs for this tool indicate that it might only get you the dependencies for a project,
swift-package-list <project-path>
; is there a possibility of getting dependencies for a specific target as well?Possibly related, I get the following error when trying to run the command:
Notably, I am using Xcode's UI to manage all of my Swift package dependencies.
The text was updated successfully, but these errors were encountered: