-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
HasteFS file size #7580
HasteFS file size #7580
Conversation
b3146e1
to
90dd1a5
Compare
90dd1a5
to
d98d7e7
Compare
Codecov Report
@@ Coverage Diff @@
## master #7580 +/- ##
==========================================
- Coverage 67.99% 67.99% -0.01%
==========================================
Files 248 248
Lines 9490 9494 +4
Branches 6 5 -1
==========================================
+ Hits 6453 6455 +2
- Misses 3035 3037 +2
Partials 2 2
Continue to review full report at Codecov.
|
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.
Overall it looks good to me. I noticed the watchman
integration is also done, so I'm happy with it. We can release an alpha
with this once merged and then test it internally (cc @rubennorte).
d98d7e7
to
8b3cf0a
Compare
Rebased on master |
8b3cf0a
to
151b535
Compare
Alright, should be ready for merge then :) |
This is great work, thanks for doing this and going for the proper, long fix! |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
This PR adds a file size field to the haste map file metadata and exposes
hasteFS.getSize(path)
.It also updates
TestSequencer
to use the file size data from thehasteFS
instead ofstatSync
ing on its own.This will become more important if the number of file size checks increases because of #7553.
cc @SimenB @cpojer @rubennorte
The "low-level" internals like HasteMap are pretty new to me, I'd appreciate a review from someone familiar with it who knows what implications this change could have :) e.g. what happens with existing serialized haste maps? Is this breaking?
And this will certainly need approval from someone from FB.
Test plan
Added e2e test
haste_map_size
similar tohaste_map_sha1
.TestSequencer
still works.