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

Update Haskell.nix #888

Merged
merged 8 commits into from
Nov 4, 2019
Merged

Update Haskell.nix #888

merged 8 commits into from
Nov 4, 2019

Conversation

rvl
Copy link
Contributor

@rvl rvl commented Oct 23, 2019

Relates to #703.

Overview

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

Hydra jobset
Hercules jobset
Link to download Windows testing bundle for PR #888
Link to download Windows testing bundle (master branch)

Comments

@angerman Please help

  • Fix failure for missing hsc2hs
  • Fix a previous mistake that affects cross builds (failing to cross-compile bash for some reason)
  • Worked around an evaluation error 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.

@rvl rvl requested a review from angerman October 23, 2019 07:15
@rvl rvl self-assigned this Oct 23, 2019
@angerman
Copy link
Contributor

I think you want to use https://github.com/input-output-hk/nixpkgs/archive/a8f81dc037a5977414a356dd068f2621b3c89b60.tar.gz for 19.03; especially as you want windows to work :-(
And

                (hackage: {
                    packages = {
                        "hsc2hs" = (((hackage.hsc2hs)."0.68.4").revisions).default;
                    };
                })

in the pkg-def-extras in the default.nix to get the hsc2hs issue resolved.

@rvl rvl force-pushed the rvl/703/update-haskell-nix branch 4 times, most recently from 70617f4 to ae5733c Compare October 24, 2019 09:13
@rvl
Copy link
Contributor Author

rvl commented Oct 24, 2019

Thanks @angerman. I think there is just one more thing that needs to be done for this. That is, get it evaluating on Hydra. Currently it's taking a long time to evaluate and not succeeding. Do you know what could be the cause?

@rvl rvl force-pushed the rvl/703/update-haskell-nix branch from 0da30d3 to 7ccc983 Compare October 25, 2019 02:44
@rvl rvl changed the title wip: Update Haskell.nix Update Haskell.nix Oct 25, 2019
@rvl rvl marked this pull request as ready for review October 25, 2019 02:45
Copy link
Contributor

@angerman angerman left a comment

Choose a reason for hiding this comment

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

While my choice of ci.nix attribute naming is slightly different, that's mostly due to personal taste.

The additional injection of overlays and config, seems slightly complicated but I believe this to be a defect of haskell.nix; not sure I know of a better UI yet though.

@KtorZ
Copy link
Member

KtorZ commented Oct 28, 2019

bors r+

iohk-bors bot added a commit that referenced this pull request Oct 28, 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.

# Next PRs

- [ ] Fix failures in sqlite tests on Windows.
- [ ] 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 <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 28, 2019

Build failed

@KtorZ
Copy link
Member

KtorZ commented Oct 29, 2019

bors r+

iohk-bors bot added a commit that referenced this pull request Oct 29, 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.

# Next PRs

- [ ] Fix failures in sqlite tests on Windows.
- [ ] 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 <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 29, 2019

Timed out

@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
@cleverca22 cleverca22 force-pushed the rvl/703/update-haskell-nix branch 2 times, most recently from 4534ec2 to a591209 Compare November 4, 2019 15:17
@KtorZ
Copy link
Member

KtorZ commented Nov 4, 2019

bors r+

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 <[email protected]>
Co-authored-by: Michael Bishop <[email protected]>
Co-authored-by: KtorZ <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 4, 2019

Build failed (retrying...)

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 <[email protected]>
Co-authored-by: Michael Bishop <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 4, 2019

Build succeeded

@iohk-bors iohk-bors bot merged commit d27da42 into master Nov 4, 2019
@rvl
Copy link
Contributor Author

rvl commented Nov 4, 2019

@cleverca22 @disassembler @KtorZ this commit d27da42 is a hack not a proper fix. It makes CI green but the problems are still there and will reappear. The underlying problems shouldn't be ignored and need to be fixed.

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 <[email protected]>
Co-authored-by: iohk-bors[bot] <43231472+iohk-bors[bot]@users.noreply.github.com>
Co-authored-by: Rodney Lorrimar <[email protected]>
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 <[email protected]>
@rvl rvl deleted the rvl/703/update-haskell-nix branch November 5, 2019 05:50
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 <[email protected]>
@KtorZ KtorZ added this to the Usability & Compatibility milestone Nov 6, 2019
iohk-bors bot added a commit that referenced this pull request Nov 11, 2019
964: Add macOS tarball download to Hydra r=KtorZ a=rvl

Relates to #704.

# Overview

- Adds a downloadable macOS tarball to the Hydra jobset.
- Fixes closure size/caching issues which were hacked around in #888. (Halves the closure size of the nix-shell, ensures that Buildkite steps are also built in Hydra)
- Adds placeholder for a musl libc fully static build. Tools team can help complete it.

# Comments

- I have tested the binaries on a MacBook Pro with `cardano-wallet-jormungandr launch --genesis-block ...` 

[Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-964#tabs-jobs)
[macOS tarball](https://hydra.iohk.io/job/Cardano/cardano-wallet-pr-964/cardano-wallet-jormungandr-macos64/latest)


Co-authored-by: Rodney Lorrimar <[email protected]>
iohk-bors bot added a commit that referenced this pull request Nov 11, 2019
964: Add macOS tarball download to Hydra r=rvl a=rvl

Relates to #704.

# Overview

- Adds a downloadable macOS tarball to the Hydra jobset.
- Fixes closure size/caching issues which were hacked around in #888. (Halves the closure size of the nix-shell, ensures that Buildkite steps are also built in Hydra)
- Adds placeholder for a musl libc fully static build. Tools team can help complete it.

# Comments

- I have tested the binaries on a MacBook Pro with `cardano-wallet-jormungandr launch --genesis-block ...` 

[Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-964#tabs-jobs)
[macOS tarball](https://hydra.iohk.io/job/Cardano/cardano-wallet-pr-964/cardano-wallet-jormungandr-macos64/latest)


Co-authored-by: Rodney Lorrimar <[email protected]>
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.

4 participants