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

Fix Sqlite DB on Windows #918

Merged
merged 1 commit into from
Nov 5, 2019
Merged

Fix Sqlite DB on Windows #918

merged 1 commit into from
Nov 5, 2019

Conversation

rvl
Copy link
Contributor

@rvl rvl commented Oct 25, 2019

Relates to #703.
Based on the branch of #888.

Overview

The wallet failed with:

NUL: openFile: does not exist (No such file or directory)

This is due to runMigrationSilent which uses the silently library:

http://hackage.haskell.org/package/silently-1.2.5.1/docs/src/System.IO.Silently.html#line-27

To fix, we swap runMigrationQuiet for runMigrationSilent on Windows.

@rvl rvl self-assigned this Oct 25, 2019
@rvl rvl changed the title Rvl/703/fix sqlite windows Fix Sqlite DB on Windows Oct 25, 2019
( runMigration, showMigration )

-- Replace the "runMigrationSilent" that uses "hSilence" which does not seem to
-- work on Windows!
Copy link
Member

Choose a reason for hiding this comment

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

🤦‍♂️ seriously

@rvl rvl force-pushed the rvl/703/update-haskell-nix branch from 7ccc983 to 717f1b5 Compare October 28, 2019 05:05
@rvl rvl force-pushed the rvl/703/fix-sqlite-windows branch from a25ebd8 to 3ab160e Compare October 28, 2019 05:13
@rvl
Copy link
Contributor Author

rvl commented Oct 28, 2019

I was looking at fixing this in our fork of persistent and noticed that the recent persistent-2.10.2 release has a new function runMigrationQuiet that doesn't use hSilence. So I have updated the version and switched to that.

In stack.yaml we really shouldn't be using personal forks long term because it causes maintenance issues for the team.

It will be easier to keep persistent-* package versions synced if they are all supplied as subdirs of extra-deps.

@KtorZ
Copy link
Member

KtorZ commented Oct 28, 2019

@rvl

In stack.yaml we really shouldn't be using personal forks long term because it causes maintenance issues for the team.

I agree, this was only temporary until I could get proper access for our team. This has been updated and now points to:

https://github.com/input-output-hk/persistent/tree/cardano-wallet

Copy link
Member

@KtorZ KtorZ left a comment

Choose a reason for hiding this comment

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

LGTM (for the dev part)

@rvl rvl mentioned this pull request Oct 31, 2019
10 tasks
@rvl rvl force-pushed the rvl/703/update-haskell-nix branch 2 times, most recently from 1679e94 to a5fecf0 Compare November 4, 2019 00:49
@disassembler disassembler force-pushed the rvl/703/update-haskell-nix branch 2 times, most recently from 3c5af93 to d27da42 Compare November 4, 2019 15:36
iohk-bors bot added a commit that referenced this pull request Nov 4, 2019
888: Update Haskell.nix r=KtorZ a=rvl

Relates to #703.

# Overview

- [x] Updates the Haskell.nix version so that we can build for windows again.
- [x] Keeps more or less the same structure as before - i.e. no IFD, no niv. I don't want too much change at once.
- [x] Does however update nixpkgs from iohk fork of 18.09 → upstream 19.03.
- [x] Provides a big bundle of scripts and tests that can be run on Windows.

[Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-888)
[Hercules jobset](https://hercules-ci.com/github/input-output-hk/cardano-wallet)
[Link to download Windows testing bundle for PR #888](https://hydra.iohk.io/job/Cardano/cardano-wallet-pr-888/cardano-wallet-jormungandr-win64/latest)
[Link to download Windows testing bundle (master branch)](https://hydra.iohk.io/job/Cardano/cardano-wallet/cardano-wallet-jormungandr-win64/latest)

# Comments

@angerman Please help

- [x] Fix failure for missing `hsc2hs`
- [x] Fix a previous mistake that affects cross builds (failing to cross-compile bash for some reason)
- [x] Worked around an [evaluation error](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-888#tabs-errors) because weeder and ghci are no longer available from `pkgs.haskellPackages`.
- [ ] Evaluation is taking a rather long time (5+ hours) in Hydra.
- [ ] Some of the Buildkite pipeline steps don't work with the updated Haskell.nix.
- [ ] Tests for windows are built not not executed. The tests should be run under wine.

# Next PRs

- [ ] Fix failures in sqlite tests on Windows ⇒ #918.
- [ ] Fix failure in launch command on Windows.
- [ ] Fix the UTF-8 text issues on Windows ⇒ #914.
- [ ] Add code which tells the windows command prompt to interpret ANSI color codes.
- [ ] Identify other test failures and fix.


952: review golden tests for legacy transaction and generate witnesses using jcli r=KtorZ a=KtorZ

# Issue Number

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

N/A

# Overview

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

- [x] I have reviewed the legacy transaction golden tests, now fully using jcli to also generate the witnesses (this feature was missing when the golden tests were initially implemented). 

- [x] I have updated the comment on private key to reflect the real format expected by jcli 

# Comments

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

A bit disappointing to some extend since nothing really has changed.. It seems that we were already providing the right output :( 

<!-- 
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 <rodney.lorrimar@iohk.io>
Co-authored-by: Michael Bishop <cleverca22@gmail.com>
Co-authored-by: KtorZ <matthias.benkort@gmail.com>
iohk-bors bot added a commit that referenced this pull request Nov 4, 2019
888: Update Haskell.nix r=KtorZ a=rvl

Relates to #703.

# Overview

- [x] Updates the Haskell.nix version so that we can build for windows again.
- [x] Keeps more or less the same structure as before - i.e. no IFD, no niv. I don't want too much change at once.
- [x] Does however update nixpkgs from iohk fork of 18.09 → upstream 19.03.
- [x] Provides a big bundle of scripts and tests that can be run on Windows.

[Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-888)
[Hercules jobset](https://hercules-ci.com/github/input-output-hk/cardano-wallet)
[Link to download Windows testing bundle for PR #888](https://hydra.iohk.io/job/Cardano/cardano-wallet-pr-888/cardano-wallet-jormungandr-win64/latest)
[Link to download Windows testing bundle (master branch)](https://hydra.iohk.io/job/Cardano/cardano-wallet/cardano-wallet-jormungandr-win64/latest)

# Comments

@angerman Please help

- [x] Fix failure for missing `hsc2hs`
- [x] Fix a previous mistake that affects cross builds (failing to cross-compile bash for some reason)
- [x] Worked around an [evaluation error](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-888#tabs-errors) because weeder and ghci are no longer available from `pkgs.haskellPackages`.
- [ ] Evaluation is taking a rather long time (5+ hours) in Hydra.
- [ ] Some of the Buildkite pipeline steps don't work with the updated Haskell.nix.
- [ ] Tests for windows are built not not executed. The tests should be run under wine.

# Next PRs

- [ ] Fix failures in sqlite tests on Windows ⇒ #918.
- [ ] Fix failure in launch command on Windows.
- [ ] Fix the UTF-8 text issues on Windows ⇒ #914.
- [ ] Add code which tells the windows command prompt to interpret ANSI color codes.
- [ ] Identify other test failures and fix.


Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
Co-authored-by: Michael Bishop <cleverca22@gmail.com>
The wallet failed with:

    NUL: openFile: does not exist (No such file or directory)

This is due to runMigrationSilent which uses the silently library:

http://hackage.haskell.org/package/silently-1.2.5.1/docs/src/System.IO.Silently.html#line-27

To fix, we swap runMigrationSilent with runMigrationQuiet (added in
persistent-2.10.2).
@rvl rvl force-pushed the rvl/703/fix-sqlite-windows branch from 526a981 to 23875ba Compare November 5, 2019 00:14
@rvl
Copy link
Contributor Author

rvl commented Nov 5, 2019

bors r+

iohk-bors bot added a commit that referenced this pull request Nov 5, 2019
918: Fix Sqlite DB on Windows r=rvl a=rvl

Relates to #703.
Based on the branch of #888.

# Overview

The wallet failed with:

    NUL: openFile: does not exist (No such file or directory)

This is due to runMigrationSilent which uses the silently library:

http://hackage.haskell.org/package/silently-1.2.5.1/docs/src/System.IO.Silently.html#line-27

To fix, we swap `runMigrationQuiet` for `runMigrationSilent` on Windows.


Co-authored-by: KtorZ <matthias.benkort@gmail.com>
Co-authored-by: iohk-bors[bot] <43231472+iohk-bors[bot]@users.noreply.github.com>
Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 5, 2019

Build failed

@rvl rvl changed the base branch from rvl/703/update-haskell-nix to master November 5, 2019 03:28
@rvl
Copy link
Contributor Author

rvl commented Nov 5, 2019

Fixed base branch and cleared stack caches on Buildkite.

bors r+

iohk-bors bot added a commit that referenced this pull request Nov 5, 2019
918: Fix Sqlite DB on Windows r=rvl a=rvl

Relates to #703.
Based on the branch of #888.

# Overview

The wallet failed with:

    NUL: openFile: does not exist (No such file or directory)

This is due to runMigrationSilent which uses the silently library:

http://hackage.haskell.org/package/silently-1.2.5.1/docs/src/System.IO.Silently.html#line-27

To fix, we swap `runMigrationQuiet` for `runMigrationSilent` on Windows.


Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 5, 2019

Build failed

@rvl
Copy link
Contributor Author

rvl commented Nov 5, 2019

The integration tests failed due to #931. Retrying.

bors r+

iohk-bors bot added a commit that referenced this pull request Nov 5, 2019
918: Fix Sqlite DB on Windows r=rvl a=rvl

Relates to #703.
Based on the branch of #888.

# Overview

The wallet failed with:

    NUL: openFile: does not exist (No such file or directory)

This is due to runMigrationSilent which uses the silently library:

http://hackage.haskell.org/package/silently-1.2.5.1/docs/src/System.IO.Silently.html#line-27

To fix, we swap `runMigrationQuiet` for `runMigrationSilent` on Windows.


Co-authored-by: Rodney Lorrimar <rodney.lorrimar@iohk.io>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 5, 2019

Build succeeded

@iohk-bors iohk-bors bot merged commit 23875ba into master Nov 5, 2019
@rvl rvl deleted the rvl/703/fix-sqlite-windows branch November 5, 2019 10:14
@KtorZ KtorZ added this to the Usability & Compatibility milestone Nov 6, 2019
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