swift-numerics icon indicating copy to clipboard operation
swift-numerics copied to clipboard

Always warning in Xcode with version 1.0.2

Open diuming opened this issue 1 year ago • 6 comments
trafficstars

skipping cache due to an error: https://github.com/apple/swift-numerics.git: The repository could not be found. Make sure a valid repository exists at the specified location and try again.

diuming avatar May 18 '24 00:05 diuming

How do I fix this?

paulsUsername avatar Sep 30 '24 09:09 paulsUsername

@paulsUsername Try adding https://github.com/apple/swift-numerics without the .git extension

artemelianov avatar Sep 30 '24 10:09 artemelianov

Yeah, I see this a lot in my projects, too. The problem is that it's not a warning, it's an error, so I can't update the packages for my own project while something within them relies on this project.

4ee9e68d57b958a8

tonyarnold avatar Oct 03 '24 23:10 tonyarnold

@tonyarnold not an ideal "solution", but I had the same issue, caused by using swift-algorithms. My solution was to comment out all the code using the package, commenting out the dependency from my Package.swift, updating all my packages, and finally undoing all the commenting out.

Luckily for me that was just ~50 lines of code that was fairly nicely isolated.

Iikeli avatar Nov 13 '24 15:11 Iikeli

Thanks for the suggestion, @Iikeli. Unfortunately in my project, Swift Numerics is an indirect dependency of something else, and that something else is used in too many places to comment them out.

I wonder if this is actually a SwiftPM issue, rather than something that this repository has done wrong?

tonyarnold avatar Nov 13 '24 21:11 tonyarnold

I have seen many posts about this issue on other packages. All changes discussed here will be in your file ~/.gitconfig

Fix 1 Change forceSignAnnotated to false. Source As Taras pointed out we're configuring Git so that it does not require GPG signatures for annotated tags on a global level for the user. git config --global tag.forcesignannotated false

Fix 2 Apparently if you're using SourceTree, remove these lines. Source

[safe]
    bareRepository = explicit

or change it to:

[safe]
    bareRepository = *

Fallback In my case, I still couldn't get it work, I realized I couldn't even push changes to my repo because I didn't have set the gpg.format

[gpg]
	program = gpg
	format = openpgp

If this wasn't your issue, just try to commit and push changes through the Terminal and fix the errors you see on it, with all previous changes done, it should be working by now.

JHeisecke avatar Dec 07 '24 13:12 JHeisecke