conda-forge / ghc-feedstock

A conda-smithy repository for ghc.
BSD 3-Clause "New" or "Revised" License
2 stars 14 forks source link

Fix compiling #21

Closed isuruf closed 2 years ago

isuruf commented 3 years ago

Fixes #9 Fixes #19

conda-forge-linter commented 3 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

xhochy commented 3 years ago

If i run ghc-pkg recache in the test section before compiling, everything works. This is probably not something that would qualify for a post-link script? Seems like all other distributions put it there though.

xhochy commented 3 years ago

post-link is probably not the right place as we also need to run this once a new Haskell packages was installed, we would need an equivalent to apt's triggers here. Thus I would rather propose:

  1. Completely delete the package cache from the ghc package (Debian does this too https://salsa.debian.org/haskell-team/DHG_packages/-/blob/master/p/ghc/debian/rules#L196, this was why I initially removed the ghc-pkg recache from the recipe). 2a. Run ghc-pkg recache on environment activation. A no-op run takes 140ms for me (Rosetta 2 on Apple M1), this is fast but not super-fast 2b. Add a tiny helper executable that checks whether we need to ghc-pkg recache on environment activation. This would require logic to find out whether we need to run ghc-pkg recache. The non-existence of the cache is definitely one but we would also need to rerun the script once we installed another haskell package via conda and in that case the package already exists but is outdated. 2c. Add a wrapper around all ghc commands that would run ghc-pkg recache in front of them.
isuruf commented 3 years ago

Completely delete the package cache from the ghc package

sounds good to me.

jakirkham commented 2 years ago

Thank you both! 😄

step21 commented 2 years ago

Thanks!