Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad pathspec #190

Closed
iosdevben opened this issue Aug 2, 2016 · 10 comments
Closed

Bad pathspec #190

iosdevben opened this issue Aug 2, 2016 · 10 comments
Assignees

Comments

@iosdevben
Copy link

iosdevben commented Aug 2, 2016

I'm attempting to update to the latest OHHTTPStubs with Carthage and when I got to commit I'm getting the following error:

git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree rm -q -f -- Carthage/Checkouts/OHHTTPStubs/Examples/ObjC/Pods/Headers/Public/OHHTTPStubs/NSMutableURLRequest+HTTPBodyTesting.h 
fatal: pathspec 'Carthage/Checkouts/OHHTTPStubs/Examples/ObjC/Pods/Headers/Public/OHHTTPStubs/NSMutableURLRequest+HTTPBodyTesting.h' did not match any files
Completed with errors, see above

I'm not sure if this is caused by OHHTTPStubs or Carthage.

@Ashton-W
Copy link
Collaborator

Ashton-W commented Aug 2, 2016

Not sure why something is trying to get a diff of that file, have changes been made in your checkout? Are you using the submodules feature of Carthage?

Is there some prior console output you can share?

@iosdevben
Copy link
Author

Hi Ashton,

Answers below.

Regards,
Ben Thomas

On 2 Aug. 2016, at 15:37, Ashton Williams [email protected] wrote:

Not sure why something is trying to get a diff of that file, have changes been made in your checkout?

No.

Are you using the submodules feature of Carthage?

No.
Is there some prior console output you can share?

No. I literally changed the version number from 4.7.0 to 5.1.0, ran carthage update --no-build then tried to stage the files and git complained.

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@iosdevben
Copy link
Author

I was able to update to version 5.0.0 without this issue occurring, but when going from 5.0.0 - 5.1.0 it occurs.

@AliSoftware
Copy link
Owner

It's strange that you have NSMutableURLRequest+HTTPBodyTesting.h between 5.0.0 and 5.1.0.

This was introduced as part of #166 + #180 PRs which were both part of the 5.1.0 release

So the intermediate NSMutableURLRequest+HTTPBodyTesting.h file shouldn't appear in the 5.1.0 release. If you look at the content of that folder in the repository locked at tag 5.1.0 you can see that in 5.1.0 the file is named NSURLRequest+HTTPBodyTesting.h, not NSMutableURLRequest+HTTPBodyTesting.h.

So I wonder where does Carthage gets that NSMutableURLRequest+HTTPBodyTesting.h from instead of using NSURLRequest+HTTPBodyTesting.h?

@AliSoftware
Copy link
Owner

Oh, wait, it seems that I forgot to update the Sample projects. That file is in Examples/ObjC/ indeed. So the path spec problem isn't with the framework itself, it's with the sample project that I ship along in the repo to demonstrate usage. I wonder why Carthage would have to look into that and care about that?!

@Liquidsoul
Copy link
Collaborator

I think I saw that Carthage tries to build every shared schemes in a repository.
A solution I used for some private libs was to remove all shared schemes not matching a framework (i.e. example projects schemes), but it may not be applicable in our case here.

@Liquidsoul
Copy link
Collaborator

I've fixed the example projects in #194 which should fix the issue.
@iosdevben, it would be awesome if you could test your Carthage setup using the branch issue_190_carthage_and_examples_projects to see if this fixes your problem 😃

@Liquidsoul
Copy link
Collaborator

@iosdevben: Changes have been merged into master 😉

@AliSoftware
Copy link
Owner

I'm closing this as the fix has been merged and 5.2.0 should resolve the problem. Feel free to re-open if the problem reappears.

@iosdevben
Copy link
Author

@Liquidsoul: Sorry I didn't get a chance to try your branch but thanks for your work fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants