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
Prefactor package hashing #4816
Changes from 1 commit
d835690
c760457
4720f40
4b1fd4f
be50d8e
2b7e154
7bb65aa
57cd58e
8258d86
a55c004
a5f3b1b
5f3bcbe
269e49b
2df5983
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,7 +138,7 @@ func getPackageFileHashesFromProcessingGitIgnore(rootPath turbopath.AbsoluteSyst | |
return nil | ||
} | ||
} | ||
hash, err := fs.GitLikeHashFile(convertedName.ToString()) | ||
hash, err := fs.GitLikeHashFile(convertedName) | ||
if err != nil { | ||
return fmt.Errorf("could not hash file %v. \n%w", convertedName.ToString(), err) | ||
} | ||
|
@@ -253,7 +253,7 @@ func GetPackageFileHashes(rootPath turbopath.AbsoluteSystemPath, packagePath tur | |
func manuallyHashFiles(rootPath turbopath.AbsoluteSystemPath, files []turbopath.AnchoredSystemPath) (map[turbopath.AnchoredUnixPath]string, error) { | ||
hashObject := make(map[turbopath.AnchoredUnixPath]string) | ||
for _, file := range files { | ||
hash, err := fs.GitLikeHashFile(file.ToString()) | ||
hash, err := fs.GitLikeHashFile(file.RestoreAnchor(rootPath)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But here we can see that if you end up manually hashing files that we would fail if you were using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I like to add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIUC, this fixes the bug. Previously we called There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, this bug is fully addressed. |
||
if err != nil { | ||
return nil, fmt.Errorf("could not hash file %v. \n%w", file.ToString(), err) | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since I needed to touch this, I made it a
turbopath
...