-
Notifications
You must be signed in to change notification settings - Fork 26
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
Update the symlink creation #225
Conversation
- Build a quasi-graph using a map that can be traversed and create symlinks that are not dependent on other symlinks
290a644
to
b6d49d2
Compare
@paketo-buildpacks/tooling-maintainers I only have two question for code review.
|
maxIterations := len(symlinkMap)
for i := 0; i < maxIterations; i++ {
for path, linkname := range symlinkMap {
if shouldSkipLink {
continue
}
// make the link
delete(symlinkMap, path)
break
}
}
if len(symlinkMap) > 0 {
return errors.New("this symlink graph contains a cycle!")
} |
@ryanmoran Great. I will ping you when I have finished up those changes |
@ryanmoran I added to logic to both remove the potential for deadlock as well as removing the label. I didn't quite grock what you wanted in terms of extracting the functionality so I left it in place for the time being. |
@ForestEckhardt here is what I was thinking: e298983 |
@ryanmoran Honestly that refactor works for me! If that is all good on your end then we can just merge. |
Attempts to get rid of sorting and make the algorithm more graph like. This will hopefully make the algorithm more robust by removing the significance of ordering of the files.
Resolves #224
Checklist