Skip to content

Add a customized GitRepositoryError and funnel all Git operations through a method that throws one of those if an operation fails. #2958

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

Conversation

abertelrud
Copy link
Contributor

This makes sure that Git failures clients can distinguish from other Process errors (so failure handling can be customized), and that they all have a location. At present the location for an error during a cloning operation is the remote URL, while the operation for an operation on a local clone is the path of the local clone. We might want to extend this in the future so that local clones also keep track of the URL, but this will require the GitRepository to keep a copy of the associated RepositorySpecifier of its origin remote. This would in turn require a change to the Repository protocol so that all methods take a RepositorySpecificier, and it would require changes to all the clients. So that should be a separate PR.

…ough a method that throws one of those if the operation fails. This makes sure that Git failures clients can distinguish from other Process errors (so failure handling can be customized), and that they all have a location.
@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud
Copy link
Contributor Author

Looks like the CI is currently having unrelated issues: java.io.IOException: Read-only file system

@abertelrud
Copy link
Contributor Author

The macOS test failure seems to be because of not using a new enough swift-tools-support-core.

@abertelrud
Copy link
Contributor Author

@Swift-C please smoke test

@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud
Copy link
Contributor Author

The Linux failures seem to have been due to the SwiftDriver CMake problem. Trying again.

@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

@abertelrud
Copy link
Contributor Author

The test failures are different this time but still completely unrelated to this PR:

12:09:09 
/home/buildnode/jenkins/workspace/swift-package-manager-Linux-smoke-test/branch-main/swift/include/swift/Runtime/Concurrent.h:671:9: error: use of undeclared identifier 'swift_runtime_unreachable'; did you mean 'swift_unreachable'?
12:09:09         swift_runtime_unreachable("unknown index size");

@abertelrud
Copy link
Contributor Author

The test failure is the same as in #2970

@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

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