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

Define and use safe 'eitherRunGet' to avoid throwing on binary decoding #1229

Merged
merged 6 commits into from
Dec 24, 2019

Conversation

KtorZ
Copy link
Member

@KtorZ KtorZ commented Dec 24, 2019

Issue Number

#1228

Overview

  • ca2675b
    illustrate non-safety in Jörmungandr API client binary decoders

  • 8e87584
    define and export a safe version of 'runGet'

  • 428d0c8
    use safe 'eitherRunGet' to decode API types

  • 36d794b
    move 'eitherRunGet' into its own module for re-usability

  • f6bec23
    safely decode IPC messages on Windows using eitherRunGet

  • 26dd771
    re-generate nix machinery

@KtorZ
Copy link
Member Author

KtorZ commented Dec 24, 2019

bors try

iohk-bors bot added a commit that referenced this pull request Dec 24, 2019
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Dec 24, 2019

try

Build succeeded

@KtorZ KtorZ merged commit 03c4972 into master Dec 24, 2019
@KtorZ KtorZ deleted the KtorZ/1228/safe-eitherRunGet branch December 24, 2019 16:07
Copy link
Contributor

@rvl rvl left a comment

Choose a reason for hiding this comment

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

Looks like this will quash the error call from runGet.

The runNodeChannel loop relies on an exception to terminate. On posix the hGet function will throw an IOError if the channel is closed. It appears that on windows, hGet returns an empty string. It may not even throw an exception. I will check that.

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.

2 participants