haskell / play-haskell

Haskell Playground
125 stars 8 forks source link

Request for packages: chronos and torsor #40

Closed Kleidukos closed 9 months ago

Kleidukos commented 9 months ago

Hi @tomsmeding,

I'd like to ask if it was possible to make the chronos and torsor packages available from the playground. :)

tomsmeding commented 9 months ago

torsor is tiny, but I need to check the dependency footprint of chronos; will so tomorrow. Is there a particular reason for wanting them in the playground?

Kleidukos commented 9 months ago

@tomsmeding I found myself having to convert code from time to chronos and being able to use the playground would have been quite useful, I have to admit. :)

tomsmeding commented 9 months ago

These would be the packages that get added to the transitive dependency graph:

bytebuild
byteslice
bytesmith
chronos
contiguous
foldable1-classes-compat
haskell-src-exts
haskell-src-meta
natural-arithmetic
primitive-addr
primitive-offset
primitive-unlifted
run-st
safe
syb
th-compat
th-expand-syns
th-orphans
th-reify-many
torsor
tuples
wide-word
zigzag
tomsmeding commented 9 months ago

That's about 87 MiB, meaning 870 MiB for 10 GHC versions. I'll add these for now, but at some point I'll need a bigger disk lol.

Kleidukos commented 9 months ago

@tomsmeding That can be arranged :)

Kleidukos commented 9 months ago

@tomsmeding Could this be related to the following message I'm seeing for the last two GHC versions?

: cannot satisfy -package-id MonadRandom-0.6-3382616cb5ef55ed489e0c236e3520b4b8049c9973b2e8040115aa17a5f86929 (use -v for more information)

tomsmeding commented 9 months ago

Hm, it seems that while one is building a bunch of packages, the cabal store you're doing that in (typically ~/.cabal/store/ghc-version, but an isolated one in the case of the playground) is invalid. I'm currently rebuilding stuff for 9.6 and 9.8 but went off doing something else in the mean time. The builds failed, which is fine -- I thought -- but apparently that invalidates the live store.

Case in point: while writing this I was getting "missing package adjunctions", and when the build progressed past adjunctions, the error changed into a different, not-yet-built package.

Maybe this means I should be doing builds into a fresh store that is not the live one!

But maybe this also means that cabal-install should maintain a valid store while rebuilding stuff!

Kleidukos commented 9 months ago

But maybe this also means that cabal-install should maintain a valid store while rebuilding stuff!

We at the cabal team would be happy to hear more about this. :))

tomsmeding commented 9 months ago

My quick attempt at reproduction locally failed; in any case, the playground should be fully functional again. chronos is available in all GHC versions except 8.4.4 and 9.8.1, for which it didn't configure.

If I reproduce the cabal issue I'll get in contact.