yesodweb / yesod-scaffold

The Yesod scaffolding, with branches for different versions.
MIT License
75 stars 39 forks source link

The haddock comment in stack-templates is broken and HLS cannot be enabled by default #209

Open ncaq opened 2 years ago

ncaq commented 2 years ago

This issue is related to the following repository issues The README says that the issue should be written here, so I am building the issue here.

yesodweb/stack-templates: Yesod's scaffoldings, for use with the stack new command

Reproduction steps.

Enable the following settings in the configuration file

~/.stack/config.yaml

# for [haskell-language-server](https://github.com/haskell/haskell-language-server)
ghc-options:
  "$everything": -haddock

Do it.

stack new postgres-project yesodweb/postgres
cd postgres-project
stack test --no-run-tests

error.

~/Downloads/postgres-project took 9s 
2022-05-30T11:45:03 [✖ ERROR  1] ❯ stack test --no-run-tests
Building all executables for `postgres-project' once. After a successful build of all of them, only specified executables will be rebuilt.
postgres-project> build (lib + exe + test)
Preprocessing library for postgres-project-0.0.0..
Building library for postgres-project-0.0.0..
[ 6 of 12] Compiling Foundation

/home/ncaq/Downloads/postgres-project/src/Foundation.hs:149:37: error:
    parse error on input ‘-- ^ generated from @Settings/StaticFiles.hs@’
    |       
149 |                                     -- ^ generated from @Settings/StaticFiles.hs@
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Progress 1/2

--  While building package postgres-project-0.0.0 (scroll up to its section to see the error) using:
      /home/ncaq/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_3.0.1.0_ghc-8.8.4 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-3.0.1.0 build lib:postgres-project exe:postgres-project test:postgres-project-test --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1

There are several similar errors.