-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Improve the diagnostics that are emitted when a package dependency specifies a non-existent branch or commit #2925
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
Merged
abertelrud
merged 1 commit into
swiftlang:master
from
abertelrud:eng/better-git-diagnostics
Sep 14, 2020
Merged
Improve the diagnostics that are emitted when a package dependency specifies a non-existent branch or commit #2925
abertelrud
merged 1 commit into
swiftlang:master
from
abertelrud:eng/better-git-diagnostics
Sep 14, 2020
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ecifies a non-existent branch or commit This also sets the code up to make it easier to do other similar heuristics as needed, and as a bonus, adds one that is related to the `master` -> `main` renaming (suggesting `main` if `master` is requested and doesn't exist, but `main` does). There isn't yet any support for fix-its in SwiftPM, but this would be a case for such a facility once it is supported. Note that tags go through different processing, since they are the inputs to the semantic versioning and missing tags are reported differently. There is no way in SwiftPM to define an explicit dependency on a non-semver tag, which is why this code only needs to handle branches and commits. The error message does not list all the branches, since there can be many, but that could be another future improvement (or at least to list all the branches whose names are similar to what was requested). rdar://34099187
@swift-ci please smoke test |
Hmm, I seem to be getting an error on Windows after this change:
|
compnerd
added a commit
to compnerd/swift-tools-support-core
that referenced
this pull request
Sep 14, 2020
…ger#2925 The `ProcessResult.Error` conformance to `CustomStringConvertible` was ignored on the Windows target accidentally. Adjust this to repair the build.
swiftlang/swift-tools-support-core#124 should repair the build |
Thanks @compnerd and apologies. It looks as thought the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This also sets the code up to make it easier to do other similar heuristics as needed, and as a bonus, adds one that is related to the
master
->main
renaming (suggestingmain
ifmaster
is requested and doesn't exist, butmain
does). There isn't yet any support for fix-its in SwiftPM, but this would be a case for such a facility once it is supported.Note that tags go through different processing, since they are the inputs to the semantic versioning and missing tags are reported differently. There is no way in SwiftPM to define an explicit dependency on a non-semver tag, which is why this code only needs to handle branches and commits.
The error message does not list all the branches, since there can be many, but that could be another future improvement (or at least to list all the branches whose names are similar to what was requested).
rdar://34099187