Skip to content

Commit

Permalink
removeReferencesToVendoredSourcesHook: dedup references (#745)
Browse files Browse the repository at this point in the history
Debug builds might have a ton of references to sources, and `sed` does
not like it when we feed it a massive amount of duplicates
  • Loading branch information
ipetkov authored Nov 24, 2024
1 parent 3cb338c commit f2b4b47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## Unreleased

### Fixed
* `removeReferencesToVendoredSources` now deduplicates any found references to
avoid pathological memory usage before removing them.

## [0.19.3] - 2024-11-18
A republish of 0.19.2 which was incorrectly tagged.

Expand Down
1 change: 1 addition & 0 deletions lib/setupHooks/removeReferencesToVendoredSourcesHook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ removeReferencesToVendoredSources() {
xargs -I DIR find -H DIR -type l -exec readlink '{}' \;
) |
grep --only-matching '@storeDir@/[a-z0-9]\{32\}' |
sort -u |
while read crateSource; do
echo -n '\|'"${crateSource#@storeDir@/}";
done || true # Handle if vendoredDir doesn't point to the store
Expand Down

0 comments on commit f2b4b47

Please sign in to comment.