-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9576dbd
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.
Hm. The perf doesn't worth the added complexity imo.
9576dbd
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.
This was because rimraf throwing an assertion error, not to improve performance. I agree with you on that part☺️
9576dbd
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.
That's weird, we're using
unlink
to delete files everywhere in the code 😯For example here: https://github.com/yarnpkg/yarn/blob/master/src/fetchers/tarball-fetcher.js#L192
9576dbd
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.
I know. I think I hit the same error you've faced when working on the cache fallback code. This failed only on AppVeyor.
9576dbd
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.
Oh .. I think the issue then was that Windows was locking the newly created file for a short time. That's why I eventually removed the unlink altogether, since it's not required strictly speaking and we're only writing in an internal directory anyway.