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

Test2::Event::Exception & IPC issues #790

Closed
autarch opened this issue Sep 29, 2017 · 4 comments
Closed

Test2::Event::Exception & IPC issues #790

autarch opened this issue Sep 29, 2017 · 4 comments

Comments

@autarch
Copy link
Contributor

autarch commented Sep 29, 2017

I had an interesting issue today with the combo of an Exception event and IPC. The Exception event contained an exception, which in turn contained a Specio::Constraint::Simple object, which in turn contains several code references.

When the IPC code attempted to serialize the Exception event, it blew up because Storable cannot store coderefs.

I could imagine this happening pretty easily with other types of exceptions that might capture objects related to the exception.

I don't have any good ideas for how Test2 might ameliorate this problem, but I figured it was at least worth noting as an issue.

@exodist
Copy link
Member

exodist commented Sep 29, 2017

I encountered this problem as well. I thought I had made it so that exceptions were stringified for serialization, apparently I only did that in the Stream formatter, and not in the IPC system itself. I will fix that at some point. I do not think it is reasonable to expect complex exceptions to go through the IPC system intact.

@autarch
Copy link
Contributor Author

autarch commented Sep 29, 2017

Forcing stringification seems fine, as long as it's documented.

@exodist
Copy link
Member

exodist commented Oct 1, 2017

This is a duplicate of #756

@exodist
Copy link
Member

exodist commented Oct 1, 2017

  • related, not duplicate.

@exodist exodist closed this as completed in 0588f12 Oct 3, 2017
exodist added a commit that referenced this issue Oct 3, 2017
    - Fix hub->process bug that could let an error pass
    - Fix #789 (Modification of read only value)
    - Fix typo in Test::Builder when looking for IPC (#777)
    - Fix #791, clone_io broke on scalar io layer
    - Fix #790 and #756, Exception event stingify exception
    - Localize $^E in context (#780)
    - Fix test that failed in verbose mode (#770)
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

No branches or pull requests

2 participants