-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Use git hash-object instead of git ls-files for inputs hashing #1699
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
|
Fixes #1250 |
|
Fixes #1249 |
|
Marking as "on hold" only to prevent automerge |
tknickman
left a comment
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.
Looks good to me.
mehulkar
left a comment
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.
Nice! I don't understand every line of Go, but I understand the gist of the work and it seems like good clean up!
| } | ||
|
|
||
| globalFileHashMap, err := fs.GetHashableDeps(rootpath, globalDepsPaths) | ||
| globalFileHashMap, err := hashing.GetHashableDeps(rootpath, globalDepsPaths) |
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.
Does Go have a way to import as or is it normal to infer hashing here from the imported package file name?
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.
It's normal to infer it, but if need be you can prefix an import with a token, like here
|
We have two more places we need to clean up that are somewhat-related, I'll pick those off.
|
As reported by @dglsparsons, after #1699 `inputs` cannot be relative from the package directory (while still remaining within the project). This issue was published in `turbo@1.4.4`. This PR patches the traversal behavior so that `inputs` works correctly and adds a test for the behavior to ensure that it does not regress.
Passing
"inputs"directly togit ls-filesusesgit's globbing, which is not the same as the rest ofturbo. Do the globbing ourselves instead, and usegit hash-object.