Skip to content

Conversation

@Abhay349
Copy link

Description:
This PR addresses three small issues in the crosslink tool:

  1. Fix Replace Pruning Logic: In [pruneReplace] the code was iterating over modContents.Replace while calling DropReplace. Since DropReplace modifies the underlying slice (shrinking it), this could cause the loop to skip consecutive elements that needed pruning. The fix collects the replacements to be dropped first, then iterates over that list to remove them safely.

  2. Fix Typo: Renamed buildDepedencyGraph to [buildDependencyGraph] (fixed missing 'n') across internal packages.

  3. Remove Stale TODO: Removed a TODO about cleanup, as t.TempDir() is used which handles cleanup automatically.

Testing:
Ran

cd crosslink
go test ./...

from root of repo, and all tests passed.

Signed-off-by: Abhay349 <pandeyabhay967@gmail.com>
@Abhay349 Abhay349 requested review from a team as code owners February 11, 2026 10:54
@Abhay349 Abhay349 requested a review from bogdandrutu February 11, 2026 10:54
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 11, 2026

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Abhay349 / name: ABHAY PANDEY (a0c9795)

Copy link
Member

@mx-psi mx-psi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, a couple of notes so we can move forward:

  1. Each change listed on your description should be its own separate PR
  2. Please add tests for the changes you are making, ideally one that reproduces the issue you are fixing when your change is not applied.

@Abhay349
Copy link
Author

@mx-psi thanks for review.
I got it and will fix changes shortly.

@codecov
Copy link

codecov bot commented Feb 12, 2026

Codecov Report

❌ Patch coverage is 68.75000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.12%. Comparing base (3099850) to head (a0c9795).
⚠️ Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
crosslink/internal/prune.go 64.28% 4 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1584      +/-   ##
==========================================
+ Coverage   64.09%   64.12%   +0.03%     
==========================================
  Files          66       66              
  Lines        3409     3412       +3     
==========================================
+ Hits         2185     2188       +3     
  Misses        988      988              
  Partials      236      236              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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