-
Notifications
You must be signed in to change notification settings - Fork 22
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
Fix index read error #583
Merged
Merged
Fix index read error #583
Commits on Sep 28, 2023
-
Make flake serialization/deserialization account for time objects
Upon transaction, flakes with time types (`xsd:time`, `xsd:date`, `xsd:dateTime`) have their values coerced to `java.time`/`js/Date` objects. When writing index files to disk, we need to write out readable strings for these objects, and then re-coerce them into time objects upon load. Previously we were writing files with unreadable tagged literals in them. Note: This writes out time strings with maximal precision, allowing us to reuse our existing datatype coercion code when loading (time strings with trailing zeros trimmed do not always satisfy our regexes). This makes for a simpler solution, but it does mean potential wasted space in our index files. We can likely optimize this in the future by having more clever formatters and/or having deserialization-specific coercion logic that recognizes truncate d values.
Configuration menu - View commit details
-
Copy full SHA for 992d3c8 - Browse repository at this point
Copy the full SHA 992d3c8View commit details -
Fix coercion for xsd:dateTime, xsd:time in clj
Fixes #580 The built-in java parsers will do the correct thing for subsecond values. We don't need to be doing any manual string-inspecting apart from determining whether an offset is present.
Configuration menu - View commit details
-
Copy full SHA for bc86894 - Browse repository at this point
Copy the full SHA bc86894View commit details -
Configuration menu - View commit details
-
Copy full SHA for 550372b - Browse repository at this point
Copy the full SHA 550372bView commit details -
Use correct type for
commit:time
valuePreviously, this value was being written as an `xsd:dateTime`, but that is not a valid `xsd:dateTime` value: https://books.xmlschemata.org/relaxng/ch19-77049.html Apart from just being incorrect, this was causing this one flake to be an anomaly among the `xsd:DateTime` flakes, breaking the assumptions needed for serialization/deserialization.
Configuration menu - View commit details
-
Copy full SHA for 49f1b34 - Browse repository at this point
Copy the full SHA 49f1b34View commit details -
simplify serialization fn now that we no longer produce anomalous `xs…
…d:dateTime` flakes Now that the `commit:time` flake is no longer erroneously of type `xsd:dateTime`, any time-typed flakes we encounter should be standardized to time objects. Therefore, we don't need to check the type, and can just use the formatters directly.
Configuration menu - View commit details
-
Copy full SHA for f17ec70 - Browse repository at this point
Copy the full SHA f17ec70View commit details -
Configuration menu - View commit details
-
Copy full SHA for ba9a452 - Browse repository at this point
Copy the full SHA ba9a452View commit details -
Configuration menu - View commit details
-
Copy full SHA for 789e437 - Browse repository at this point
Copy the full SHA 789e437View commit details
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.