Improve handling of truncated class names from git pull #511
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.
The current way of handling truncated class names from git pull seems to have two major flaws:
For example if the repository has the following base directory structure:
/foo/bar/
and contains classA.B.C
stored on disk asA/B/C.cls
(where foo and bar have no relation to any class package names)then git pull may provide truncated output such as the following:
.../bar/A/B/C.cls
ExpandClasses
will try and fail to find a class namedbar.A.B.C
with no warning generated, the class silently fails to import.ExpandClasses
has been updated so that upon failing to find any class names it will remove period-delimited pieces from the start of the name and try again, until it finds something or runs out of pieces.This would mean for example that after failing to find
bar.A.B.C
it would then tryA.B.C
and find the intended class