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.
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
feat(decoder): Add support for Structured CLP IR streams but without log-level filtering. #85
feat(decoder): Add support for Structured CLP IR streams but without log-level filtering. #85
Changes from all commits
5a751bd
11e16d5
826057f
e68a907
7aaedb5
2df1e9c
e0bdb68
479fd71
29d85a6
023e345
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
fyi i just noticed i dont think json.parse will work with big int? Like it will throw exception since it is not a json value? How do you feel about using this? There is also this hack i saw on github. I feel like in practice we won't see these weird timestamps, but wtv u think is best.
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.
Also how do u feel about this file to utils? Since it is shared by both IR and Json now?
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.
right that's an issue... Just to understand why we need the mitigation, where are we using json.parse with
BigInt
s?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.
https://github.com/y-scope/yscope-log-viewer/pull/85/files/479fd71873d96fc22688c8588579ed5b2bf89605#diff-b84b96c0d996fdf3f5d0777ce896471846d62554dd719c352314f888b5d325f2R116
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.
Potentially also in json decoder if logs have an bigint?
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.
omg...
nlohmann/json
acknowledges there are implementation whose number types can store up to 2^53-1 : https://json.nlohmann.me/features/types/number_handling/#number-interoperabilityfunny finding: https://www.github.com/nlohmann/json/issues/1708 -> https://www.github.com/nlohmann/json/pull/1722
Let's discuss the issue with the clp core people before we make changes.
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.
As discussed offline, calling
JSON.parse()
with anyclp-ffi-js
-returned JSON string containing number in +/-2^53-1
~2^64-1
would encounter loss of precision, but luckily nothing throws.Let's address the loss of precision issue in another PR.
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.
To be tracked at #116
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.
Description intentionally omitted.