-
Notifications
You must be signed in to change notification settings - Fork 320
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
Implement Debug trait for most public structs #468
Conversation
I believe the decision to omit The rationale as I remember it:
(My treacherous memory may have backfilled 2. but I'm sure of 1.) |
That would be quite unfortunate.
|
Yep, a few years ago they made a concerted effort to add |
I strongly agree on this point. I was bitten several times by it working on |
Generally I think we should try to be as minimal as possible, but if lack of Debug implementations is creating real hardship for users, we ought to just add them. I can't imagine this is going to effect build time and/or runtime very much at all. |
+1 from me too |
For the record, I'm okay with this too. I'll review but @NeoLegends, can you do a |
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.
LGTM, thank you @NeoLegends!
This adds a debug implementation for every struct within
rusty_v8
. This will make consuming it from other libraries a lot easier. The manual debug implemetations should be just like the autogenerated ones except they don'tDebug
the field that's notDebug
. If you prefer we can also derive those impls (and ignore the offenders) using https://github.com/mcarton/rust-derivative but I didn't want to add a dependency here.I would suggest to require every new struct or enum in the future also to be annotated with
Debug
.