Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

[CSL-2125] Migrating to GHC-8.2.2 and LTS-10.* #2327

Closed
wants to merge 12 commits into from

Conversation

chshersh
Copy link
Contributor

@chshersh chshersh commented Jan 13, 2018

Current blocking issue: paging file is too small error on Windows CI.

What's done:

  1. stack.yaml GitHub extra-deps are rewritten using new stack-1.6.* syntax (it made stack.yaml a little shorter).
  2. Some packages are removed from extra-deps because they are in LTS-10.6 snapshot.
  3. Bumped up dependencies to universum-1.1.0, log-warper-1.8.10 and serokel-util-0.7.0.
  4. All compilation errors fixed.
  5. perl coloring of output is removed from scripts/build/cardano-sl.sh since GHC-8.2.2 has its own coloring.
  6. Moving to GHC-8.2.2 raised a lot of warnings of case -Wsimplifiable-class-constraints. Some of them were fixed by @gromakovsky. Others — supressed.

Things to note regarding @serokell packages:

  1. log-warper-1.8.10 contains fix for async exceptions (see PR use log-warper with important bug fix #2566)
  2. time-units (and utility functions) were removed from serokell-util package becase @serokell has new, better and maintained package for time-safe units — o-clock. This resulted in a lot of dirty hacks in code (like, bringing sec :: Int -> Microsecond function at every module where it's needed). But migration from time-units to o-clock is planned under CSL-2319.
  3. universum-1.1.0 brought a lot of new things (which are the reason for most updates). See all changes here. Most developers weren't satisfied with all design decisions in universum. So here is the list of updates/improvements (it's supposed that universum will bring backwards incompatible changes almost never):
    • universum reexports id now (identity as well for compatibility).
    • putText renamed to putTextLn.
    • No more ToList type class. It's merged with Container. Element is now an associated type family.
    • head, tail, last, init work with NonEmpty. Use safeHead :: [a] -> Maybe a if you need.
    • Polymorphic elems and keys functions (so you can't have keys and elems variables).

@domenkozar
Copy link
Contributor

Nice. Depends on input-output-hk/stack2nix#84

@domenkozar
Copy link
Contributor

scripts\ci\appveyor-retry call from appveyor can now be removed (together with the script).

@gromakovsky
Copy link
Contributor

Note: I've rebased on latest develop and force pushed.

@chshersh
Copy link
Contributor Author

@gromakovsky I have the following error at the moment after running build script.

stack build --ghc-options=" -Wwarn" --test --no-haddock-deps --bench --jobs=4 --no-run-tests --no-run-benchmarks --fast  cardano-sl-lrc

cardano-sl-lrc-1.0.3: build (lib)
Preprocessing library for cardano-sl-lrc-1.0.3..
Building library for cardano-sl-lrc-1.0.3..
<command line>: cannot satisfy -package-id cardano-sl-db-1.0.3-62HR2M35wJbFeN76UjkLHG: 
    cardano-sl-db-1.0.3-62HR2M35wJbFeN76UjkLHG is unusable due to shadowed dependencies:
      cardano-sl-core-1.0.3-K0KqJaSsMYsKtjnjKGTv9X
    (use -v for more information)

Could you try to build and tell do you have similar error? I'm using stack 1.7.0.

@gromakovsky
Copy link
Contributor

@chshersh I tried it locally and I don't have such problem.
I ran ~/Work/cardano-sl/scripts/build/cardano-sl.sh --no-nix and it stopped at this stage:

[22 of 41] Test.Pos.Ssc.SeedSpec

/home/gromak/Work/cardano-sl/lib/test/Test/Pos/Ssc/SeedSpec.hs:8:1: error:
    Could not find module ‘Unsafe’
    Use -v to see a list of the files searched for.

@gromakovsky
Copy link
Contributor

But I am using stack-1.6.3. However, I don't see this difference matters.
Anyway, since this error happens to you not the first time, it might be a good idea to report it to https:/commercialhaskell/stack.

@chshersh
Copy link
Contributor Author

Looks like it's not stack issue:

Though stack shouldn't have such problem (because they did some workaround). So I've opened issue for stack anyways:

@chshersh
Copy link
Contributor Author

chshersh commented Mar 1, 2018

@domenkozar Okay, I will try to do this again.

@chshersh
Copy link
Contributor Author

chshersh commented Mar 5, 2018

Ok, so Windows CI no longer hangs by timeout. Instead it has some linker errors. buildkite build fails because log-warper has if inside it's dependencies in .cabal files and stack2nix can't handle this. I'm working on workaround for this.

@domenkozar
Copy link
Contributor

Appveyor error is same as CSL-2344

@domenkozar
Copy link
Contributor

Seems like it was addressed in develop - rebase should solve it.

@chshersh
Copy link
Contributor Author

chshersh commented Mar 6, 2018

I rebased on recent develop but the error is still there 😞

@domenkozar
Copy link
Contributor

We should also probably rename cardano-sl-wallet-new :/

@chshersh
Copy link
Contributor Author

chshersh commented Mar 7, 2018

Looks like something related to Appveyor CI and cardano-sl-wallet-new is going on here: #2626

Maybe I can try again after that PR is merged.

@chshersh
Copy link
Contributor Author

chshersh commented Mar 7, 2018

Start your day with new GHC build error on Windows...

The previous on Windows CI was fixed (probably) but now I see another error.

I discovered this discussion:

Relevant part:

The pagefile is probably set to auto, but that means a certain % of the disk, if it needs more for some
Reason it won’t grow beyond this maximum.

Maybe it can help this issue somehow.

@domenkozar
Copy link
Contributor

domenkozar commented Mar 12, 2018

I recommend renaming cardano-sl-wallet-new to cslw just to try this out.

@georgeee
Copy link
Contributor

@domenkozar didn't help

@erikd
Copy link
Member

erikd commented Mar 22, 2018

Is it possible to upgrade the urgency on this? @avieth spent hours debugging a concurrency issue only to find that its a known issue simonmar/async#81 that been fixed in the next LTS.

@adinapoli-iohk
Copy link
Contributor

@erikd I think we just need a hero to solve the conflicts and to please the CI (that's the hardest part). I think we would benefit from running weeder across the entire codebase (we need to be aware of some caveats, for example weeder cannot detect packages like autoexporter as being in use due to their use only via PRAGMAs) and see if we end up in a better place.

We had a similar situation this summer which was resolved by painfully weeding out either unused deps or packages that has "unique reverse dependency" by which I mean those packages that, if removed, would cause transitively other packages to be removed 😁 . The linked PR should have an half-baked script I have used with success this summer.

@domenkozar
Copy link
Contributor

+1 - once deps are weeded out, we need to fix MAX_PATH on windows (which @georgeee and others tried to already tried fixing it)

@KtorZ
Copy link
Contributor

KtorZ commented May 2, 2018

Closing in favor of #2745

@KtorZ KtorZ closed this May 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants