chore: remove logs #35
Merged
Merged
Conversation
emizzle
approved these changes
Apr 20, 2026
Collaborator
emizzle
left a comment
There was a problem hiding this comment.
Nice! Small suggestions to remove some more dead code, but nothing blocking.
Comment on lines
+205
to
+207
| elif opts.ignore: | ||
| # unable to figure out a way to make this a compile time check | ||
| warn "object field marked as 'ignore' while in Strict mode, field will be deserialized anyway" | ||
| discard |
Collaborator
There was a problem hiding this comment.
Probably should just remove this block.
Comment on lines
+218
to
+219
| elif hasDeserializePragma and opts.key == name: | ||
| warn "object field marked as deserialize in OptOut mode, but 'ignore' not set, field will be deserialized" | ||
| discard |
Comment on lines
+102
to
+103
| elif hasSerialize and opts.key == name: # all serialize params are default | ||
| warn "object field marked as serialize in OptOut mode, but 'ignore' not set, field will be serialized" | ||
| discard |
Comment on lines
+104
to
+107
| of Strict: | ||
| if opts.ignore: | ||
| # unable to figure out a way to make this a compile time check | ||
| warn "object field marked as 'ignore' while in Strict mode, field will be serialized anyway" | ||
| discard |
Collaborator
There was a problem hiding this comment.
Can probably remove this entire branch (starting with of Strict)
Contributor
Author
There was a problem hiding this comment.
The Strict case is needed for Nim, in order to cover all the enum cases
Contributor
Author
Yeah thanks for the suggestions ! I applied them. |
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.
The logs included in the serializer and deserializer were not working with the file-level
logScopedue to this bug.As a workaround, the
logScopewas moved inside the proc.However, this introduces
gcsafeerrors with the latest version of Chronicles.The bug has existed for years (since 2022) and appears to be somewhat complex to fix. For this reason, the simplest way to resolve the issue is to remove the logs from the affected procs.
By removing these logs, we also eliminate the only usage of Chronicles in nim-serde, allowing the dependency to be removed as well.