unisonweb / unison

A friendly programming language from the future
https://unison-lang.org
Other
5.75k stars 269 forks source link

Split off `unison-runtime` package #5308

Closed ChrisPenner closed 4 weeks ago

ChrisPenner commented 1 month ago

Overview

Split off the runtime for two reasons:

  1. parser-typechecker is still a behemoth with too much stuff
  2. Moving unison-runtime out means I can tweak runtime things without needing to rebuild ALL of parser-typechecker in -profile -O2; which takes ages.

While I was at it, I added -Wunused-packages and cleaned that up. There were a lot.

Implementation notes

Test coverage

Discovered that the Rsa.hs tests weren't actually included in any test suite for some reason haha. Added that.

aryairani commented 4 weeks ago

I poked around a little but couldn't see why things were going wrong nix-wise. Any ideas? cc @sellout

aryairani commented 4 weeks ago

On a second run the error is different or more obvious:

       > Configuring benchmark 'relation' for unison-util-relation-0.0.0..
       > building
       > Preprocessing benchmark 'relation' for unison-util-relation-0.0.0..
       > Building benchmark 'relation' for unison-util-relation-0.0.0..
       > [1 of 1] Compiling Main             ( benchmarks/relation/Main.hs, dist/build/relation/relation-tmp/Main.o )
       >
       > benchmarks/relation/Main.hs:8:1: error:
       >     Could not load module ‘Unison.Prelude’
       >     It is a member of the hidden package ‘unison-prelude-0.0.0’.
       >     Perhaps you need to add ‘unison-prelude’ to the build-depends in your .cabal file.
       >     Use -v (or `:set -v` in ghci) to see a list of the files searched for.
       >   |
       > 8 | import Unison.Prelude
       >   | ^^^^^^^^^^^^^^^^^^^^^
       For full logs, run 'nix log /nix/store/kisnjl7rqgpmijdi195h8zhkdqpchcs2-unison-util-relation-bench-relation-0.0.0.drv'.

Maybe one dependency deletion too many, @ChrisPenner?

Though I wonder why stack didn't complain? Could be something about hpack getting run or not getting run and/or an updated file not getting checked in?

ChrisPenner commented 4 weeks ago

@aryairani Oh interesting; I'm guessing we just don't build benchmarks in CI (which if we're not running them in CI is probably fine, but of course not great if we can accidentally break their builds)

You need to stack build --bench to build benchmarks usually, but that also runs the benchmarks.

aryairani commented 4 weeks ago

You need to stack build --bench to build benchmarks usually, but that also runs the benchmarks.

Need stack build --bench --no-run-benchmarks 😅