-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix package describe
support for local zip binary artifacts
#5826
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
I thought we did not support local binary artifacts to be zipped? |
They are explicitly mentioned with examples in SE-272. Any chance that changed?
Also works in Xcode 14 for what it's worth. Most teams that I've seen do this are using it with git-lfs. |
iirc supporting local zipped binary archives was added by a contributor at some point |
as for the fix itself, I suggest we modify specifically
and keep |
Thanks both. I'll take a look at reworking this and push another version. |
@iainsmith Have you had a chance to look at reworking it? |
package describe
support for local zip binary artifacts
…has a .zip extension. (#8809) Fix `swift package describe` for packages with binary artifacts that has a .zip extension. ### Motivation: Fixes #4387 I want to avoid an error when running `swift package describe` on a package that contains a binary artifact target with a `.zip` extension. ### Modifications: I modified the `Workspace.loadRootPackage(at:observabilityScope:completion)` method. Specifically, I updated the logic for local binary targets to also return a `BinaryArtifact` object when the file extension is `.zip`. This change is also based on the comment referenced [here](#5826 (comment)). ### Result: When running `swift package describe` on a package that contains a binary artifact target with a `.zip` extension, the package description is now output without throwing an error.
swift package describe should work for targets that have binary zip dependencies.
Motivation:
#4387. Several projects including swift package index and others want to use the output of
swift package describe
. This extends changes made in #3810 cc @tomerdModifications:
This patch updates,
BinaryArtifactsManager.deriveBinaryArtifactKind
to returnBinaryTarget.Kind.unknown
if the path suffix is.zip
.This seemed like the minimal change to handle zip binary artifacts in
package describe
.Alternatively it might better to extend BinaryTarget.Kind to be explicitly aware of local zips.
Let me know if there is an alternative way you'd prefer this was implemented.
Result:
Projects should be able to run
swift package describe
and get correct output.