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

ghc-pkg: cannot find package fay-text #24

Open
creichert opened this issue Apr 13, 2020 · 5 comments
Open

ghc-pkg: cannot find package fay-text #24

creichert opened this issue Apr 13, 2020 · 5 comments

Comments

@creichert
Copy link

I have an old yesod-fay project that I need to get working and I'm failing to build it:

ghc-pkg: cannot find package fay-text

[...]

CallStack (from HasCallStack):
  error, called at src/Fay/Compiler/Packages.hs:74:24 in fay-0.24.0.4-EHMuEij948KB7BkQZ3wEO9:Fay.Compiler.Packages
      Code: fayFile' (ConE 'StaticR) "Home"
    • In the untyped splice: $(fayFile' (ConE 'StaticR) "Home")
   |
15 |     $(fayFile' (ConE 'StaticR) "Home")
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Any help would be appreciated.

@bergmark
Copy link

I'm not sure, but a couple of things you can try:

  • Use Data.Text instead
  • Downgrade fay, perhaps try 0.21.0.2
  • Manually install fay-text in the same package db as the rest of your project.

@swamp-agr
Copy link
Collaborator

swamp-agr commented Apr 13, 2020

Hi @creichert

Please specify:

  • GHC version you are using in your project;
  • how do you build: stack, cabal or nix; how exactly;
  • locate fay: was it installed globally, or via stack.

Let's go through the issue and I will try to reproduce it locally.

Recently I realised that I need to make a matrix of these cases and try to bring some consistent solution for fay + yesod-fay combination. This story becomes complicated.

Otherwise, you can follow advices from @bergmark !

Thanks,
@swamp-agr

@creichert
Copy link
Author

I'm using stack-1.9.1 w/ ghc 8.0.1 and trying to upgrade my snapshot to a later LTS that uses ghc 8.6.4.

Basically, I loaded up an old project and built it against an old snapshot, nightly-2016-08-14', and it worked. When I updated to a more recent snapshot, lts-13.12, I started having the failure. It's not specific to fay-textbutfay-base&fay-jquery` as well.

The project builds on CircleCI and Heroku (using a buildpack) so I'm not sure what the problem could be with my local environment. At one point my build was working briefly and then started failing again after I cleaned up some project folders (dist/ seemed to be the culprit, but I feel I'm misunderstanding some link here and don't want to add too many irrelevant details).

This stack overflow post is the exact issue I had with more detail: https://stackoverflow.com/questions/58057449/fay-cant-find-fay-base

Since the project builds fine on multiple CI platforms, I'm okay with closing this issue but I'd appreciate any tips that might help me figure out what's wrong with my local build.

Thanks!

@swamp-agr
Copy link
Collaborator

Thank you for details. I'll try to reproduce minimal example from scratch and share my observations here.

@maxigit
Copy link

maxigit commented Apr 14, 2020

Not sure if it is relevant but I can see you are using fay-jquery. I add problem upgrading to lts-12.26 and have had to patch fay-jquery to use Data.Text instead of Fay.Text. It lookes like 'Fay.Text` is not needed anymore ...

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

No branches or pull requests

4 participants