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

DaedalusIPC: Fix isWindows function #834

Merged
merged 1 commit into from
Oct 16, 2019
Merged

Conversation

rvl
Copy link
Contributor

@rvl rvl commented Oct 16, 2019

Issue Number

None.

Overview

Fixes a typo in the OS detection code for NodeIPC.

Comments

I again looked at the possibility of importing the cardano-shell package for this functionality. But it is pulling in more dependencies. Also the daedalusIPC function there had the logging replaced with putTextLn. Branch is rvl/daedalus-ipc-cardano-shell for reference though.

@rvl rvl self-assigned this Oct 16, 2019
@KtorZ KtorZ added this to the Usability & Compatibility milestone Oct 16, 2019
@KtorZ
Copy link
Member

KtorZ commented Oct 16, 2019

But it is pulling in more dependencies. Also the daedalusIPC function there had the logging replaced with putTextLn

Erf. Let's not bother with that now.

@@ -214,7 +214,7 @@ readMessage :: Handle -> IO BL.ByteString
readMessage = if isWindows then windowsReadMessage else posixReadMessage

isWindows :: Bool
isWindows = arch == "windows"
isWindows = os == "windows"
Copy link
Member

Choose a reason for hiding this comment

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

Just a thought, but perhaps we can replace this Bool check with an enumeration that includes just the platforms we care about. Perhaps like this:

data Architecture = Windows | Linux | MacOS

Then we can have:

 readMessage = \case
    Windows -> windowsReadMessage
    Linux -> posixReadMessage
    MacOS -> macOsReadMessage

Copy link
Member

Choose a reason for hiding this comment

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

For what it's worth here, it's really a local check in one place. I don't think we need much more than this.

@KtorZ
Copy link
Member

KtorZ commented Oct 16, 2019

bors r+

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 16, 2019

Merge conflict (retrying...)

iohk-bors bot added a commit that referenced this pull request Oct 16, 2019
834: DaedalusIPC: Fix isWindows function r=KtorZ a=rvl

# Issue Number

None.

# Overview

Fixes a typo in the OS detection code for NodeIPC.

# Comments

I again looked at the possibility of importing the cardano-shell package for this functionality. But it is pulling in more dependencies. Also the `daedalusIPC` function there had the logging replaced with `putTextLn`. Branch is [rvl/daedalus-ipc-cardano-shell](rvl/daedalus-ipc-fix...rvl/daedalus-ipc-cardano-shell) for reference though.


Co-authored-by: Rodney Lorrimar <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 16, 2019

Build failed

@KtorZ
Copy link
Member

KtorZ commented Oct 16, 2019

bors r+

iohk-bors bot added a commit that referenced this pull request Oct 16, 2019
834: DaedalusIPC: Fix isWindows function r=KtorZ a=rvl

# Issue Number

None.

# Overview

Fixes a typo in the OS detection code for NodeIPC.

# Comments

I again looked at the possibility of importing the cardano-shell package for this functionality. But it is pulling in more dependencies. Also the `daedalusIPC` function there had the logging replaced with `putTextLn`. Branch is [rvl/daedalus-ipc-cardano-shell](rvl/daedalus-ipc-fix...rvl/daedalus-ipc-cardano-shell) for reference though.


840: Make Jörmungandr NetworkLayer use raw blocks r=KtorZ a=Anviking


# Issue Number

#711 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I changed the constructors in `Cardano.Wallet.Jormungandr.Network` to create NetworkLayers with raw jörmungadnr-specific blocks, and later used `toWLBlock <$> nl`. This way we can later use `toSPBlock <$> nl` for stake-pools.


# Comments

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
-->


845: Add forget pending transaction endpoint (Part1) r=KtorZ a=paweljakubas

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->
#836 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I have added forget pending transaction endpoint, errors and types
- [x] I have updated swagger accordingly


# Comments

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Rodney Lorrimar <[email protected]>
Co-authored-by: Johannes Lund <[email protected]>
Co-authored-by: Pawel Jakubas <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 16, 2019

Build succeeded

@iohk-bors iohk-bors bot merged commit 4069d92 into master Oct 16, 2019
@KtorZ KtorZ deleted the rvl/daedalus-ipc-fix branch October 18, 2019 13:14
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.

3 participants