Open
Conversation
15 tasks
Ngoguey42
reviewed
Feb 9, 2022
Ngoguey42
left a comment
There was a problem hiding this comment.
Thanks for documenting all this :-)
Can you pass ocamlformat so that we can make that PR mergeable?
Comment on lines
+21
to
+22
| (* NOTE the return value is the number of bytes read; this is not completely obvious from | ||
| the code *) |
There was a problem hiding this comment.
The returned value is the new offset, after the values read
Comment on lines
+15
to
+16
| the file data (see irmin-pack's [Version] module - were the way to encode objects was | ||
| changed from [`V1] to [`V2]; [Version.set t s] will use exactly the first 8 bytes of the |
There was a problem hiding this comment.
Suggested change
| the file data (see irmin-pack's [Version] module - were the way to encode objects was | |
| changed from [`V1] to [`V2]; [Version.set t s] will use exactly the first 8 bytes of the | |
| the file data (see irmin-pack's [Version] module - where the way to encode objects was | |
| changed from [`V1] to [`V2]); [Version.set t s] will use exactly the first 8 bytes of the |
Comment on lines
+27
to
+30
| How does the user know where the header ends and the file data begins? One option is to | ||
| call {!fstat} after initializing the header info. In fact, in {!Index_unix} there is a | ||
| separate computation of the header size: [let header = eight ++ eight ++ eight ++ eight ++ | ||
| fan_size]; presumably other users of this module do the same. |
There was a problem hiding this comment.
| (** An exception that can be raised when {b reading} (not writing!) header fields, in case | ||
| the amount of bytes requested for a field is not the amount of bytes actually read | ||
| from file. This presumably happens only for files that are not initialized correctly, | ||
| i.e., they do not contain a full header. *) |
There was a problem hiding this comment.
This can happen in several other situations
Suggested change
| i.e., they do not contain a full header. *) | |
| e.g., they do not contain a full header. *) |
| the amount of bytes requested for a field is not the amount of bytes actually read | ||
| from file. This presumably happens only for files that are not initialized correctly, | ||
| i.e., they do not contain a full header. *) | ||
| (* FIXME rename this exception? *) |
There was a problem hiding this comment.
I think that documenting it is enough
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.