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

How to workaround using Stack for building html #103

Closed
hafizhmakmur opened this issue Aug 12, 2020 · 7 comments
Closed

How to workaround using Stack for building html #103

hafizhmakmur opened this issue Aug 12, 2020 · 7 comments

Comments

@hafizhmakmur
Copy link

hafizhmakmur commented Aug 12, 2020

When I execute "make html" the log outputs

stack run filters-toc src/ templates/pagemeta.template templates/index.template dist/page.template dist/index.lhs dist/links.txt
Cabal file info not found for Diff-0.3.4, updating
Selected mirrot https://s3.amazonaws.com/hackage.fpcomplete.com/
Downloading timestamp
Downloading snapshot
Downloading mirrors
Cannot update index (no local copy)
Downloading index

and it stucks here.

And when I try to cancel it, it says

make: *** [Makefile:84: dist/index.lhs] Interrupt

Any steps that I have missed?

@hafizhmakmur
Copy link
Author

After searching for the solution I found that it looks like it's a stack problem
commercialhaskell/stack#2240
commercialhaskell/stack#1223

It looks like I won't be able to use stack because every command will be too slow. Henceforth I'd like to ask whether there is any way to build the project without stack? I have a working ghc and cabal so is there a way to maybe modify the makefile to use them instead?

@hafizhmakmur hafizhmakmur changed the title Make HTML stuck at "Downloading index" How to workaround using Stack for building html Aug 13, 2020
@ranjitjhala
Copy link
Member

ranjitjhala commented Aug 13, 2020 via email

@hafizhmakmur
Copy link
Author

Dear @ranjitjhala ,

Inspired by https://liquid.kosmikus.org/ I'm trying to make my own web page that will be similar to the tutorials. So far I'm trying to just change the commands in the makefile, specifically

# bin
## INDEXER=stack exec -- runghc filters/Toc.hs
## PANDOC=pandoc
INDEXER=stack run filters-toc
PANDOC=stack exec -- pandoc

to

# bin
INDEXER=runghc filters/Toc.hs
PANDOC=pandoc

Do you think it will work? So far the latest hurdle I found with this is my difficulty in installing the Pandoc Hackage (jgm/pandoc#6612) which I think is an independent problem from this but I'm afraid after I solved that problem I'll still found a new problem that will block me.

Thank you for your attention!

@ranjitjhala
Copy link
Member

ranjitjhala commented Aug 13, 2020 via email

@hafizhmakmur
Copy link
Author

Thank you very much! I'll tell you whether it works after I solve this pandoc issue.

@hafizhmakmur
Copy link
Author

Dear @ranjitjhala,

I have a 4GB device so I'm having difficulty to install the latest pandoc. So I'm forced to install pandoc-2.7.3 and along with it downgrade my ghc to 8.6.5 . After that, I also need to fix some conversions from String to T.Text in the filters code but finally it works! Now I'm able to make the articles with your generator. Thank you very much for your assistance. :D

@ranjitjhala
Copy link
Member

ranjitjhala commented Aug 24, 2020 via email

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

2 participants