Skip to content
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

Marshalize mismatch errors #168

Merged
merged 4 commits into from
Nov 4, 2021
Merged

Marshalize mismatch errors #168

merged 4 commits into from
Nov 4, 2021

Conversation

agentdon
Copy link
Contributor

@agentdon agentdon commented Oct 25, 2021

Implements functionality to make MismatchErrors Marshalizeable.

Implements functionality to make MismatchErrors Marshalizeable.
@agentdon
Copy link
Contributor Author

Can we also drop a new patch version after this is merged? We need this change to fix some internal errors (at GitHub).

private

def marshalize(block)
def block._dump(_)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a check first before overriding? respond_to?(:_dump) || respond_to?(:_dump_data)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea. I'm working to add that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zerowidth I added a check to this before overriding. Please let me know if you have any other feedback. 🙏


private

def marshalize(block)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment here explaining why we want to make everything marshalable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. Added. 👌

@zerowidth zerowidth merged commit 8c1ec7f into github:main Nov 4, 2021
@agentdon agentdon deleted the marshalize_mismatch_errors branch November 8, 2021 17:47
agentdon added a commit that referenced this pull request Dec 9, 2021
Improves the approach that we introduced in #168 to marshal mismatch errors so that we
don't have to dynamically define methods on the procs provided by the
user. Thanks to @brasic suggesting this improvement.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants