Skip to content

Fix Swift Package Build#2

Merged
ibrahimcetin merged 2 commits into
ibrahimcetin:mainfrom
TimArt:main
Aug 7, 2025
Merged

Fix Swift Package Build#2
ibrahimcetin merged 2 commits into
ibrahimcetin:mainfrom
TimArt:main

Conversation

@TimArt

@TimArt TimArt commented Aug 7, 2025

Copy link
Copy Markdown
Contributor

Looks like SwiftGitX 0.1.7 pulls down your latest libgit2 fork release, 1.9.1 instead of 1.8.0 because the dependency rule in Package.swift will choose the latest release of your libgit2 fork.

This creates build errors for lines 30 and 31 in ObjectType.swift where the git_object_t enum values cannot be found for GIT_OBJECT_OFS_DELTA and GIT_OBJECT_REF_DELTA.

.offsetDelta: GIT_OBJECT_OFS_DELTA,
.referenceDelta: GIT_OBJECT_REF_DELTA

Setting the dependency to pull the exact version fixes the issue.
Maybe we should also pull exact versions for all the other versions too to prevent potential issues in the future?

Also sorry for the extra merge commit in this PR. I made the change on GitHub.com real quick and did it kind of hacky haha.

Thanks for your awesome library! :)

TimArt added 2 commits August 6, 2025 22:50
Fix Swift Package build which pulls libgit2 1.9.1 instead of libgit2 …
@ibrahimcetin

Copy link
Copy Markdown
Owner

Thank you!

I will add new tag with this fix.

@ibrahimcetin ibrahimcetin merged commit 91a8a13 into ibrahimcetin:main Aug 7, 2025
1 check failed
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.

2 participants