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

Hoogle does not build in vanilla stack template #1669

Open
amkhlv opened this issue Apr 23, 2020 · 13 comments
Open

Hoogle does not build in vanilla stack template #1669

amkhlv opened this issue Apr 23, 2020 · 13 comments

Comments

@amkhlv
Copy link
Contributor

amkhlv commented Apr 23, 2020

Debian Buster, 8G of RAM

stack new myproject yesod-simple

cd myproject

stack build

stack hoogle

Results in:

-- While building package haskell-src-exts-1.20.3 using: /home/andrei/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.2.0.1 haddock --html --hoogle --html-location=../$pkg-$version/ --haddock-option=--hyperlinked-source --haddock-option=--quickjump Process exited with code: ExitFailure (-11)
This seems to be an old problem

But it happens again, in vanilla Yesod template...

@ncaq
Copy link
Contributor

ncaq commented Apr 24, 2020

I have 32GB of RAM.
I confirm to repro it.

However, maybe it is GHC 8.4 bug.
See

I suggest

stack config set resolver lts

and open package.yaml remove dependencies version range.

@ncaq
Copy link
Contributor

ncaq commented Apr 24, 2020

That being said, I do think the template should be modified.

@snoyberg
Copy link
Member

I'm not following, what can be changed in the template? In any event, if this works with GHC 8.6, I don't think it's worth trying to work around an old GHC bug.

@ncaq
Copy link
Contributor

ncaq commented Apr 24, 2020

I'm not following, what can be changed in the template? In any event, if this works with GHC 8.6, I don't think it's worth trying to work around an old GHC bug.

exec stack new, stack Selected resolver: lts-12.26.
Because package.yaml dependencies not complete match lts-15.9.

* Partially matches lts-15.9                                               
    aeson version 1.4.7.1 found                                            
        - myproject requires >=0.6 && <1.4
    classy-prelude version 1.5.0 found
        - myproject requires ==1.4.*
    classy-prelude-conduit version 1.5.0 found
        - myproject requires ==1.4.*
    classy-prelude-yesod version 1.5.0 found
        - myproject requires ==1.4.*
    fast-logger version 3.0.1 found
        - myproject requires >=2.2 && <2.5
    warp version 3.3.10 found
        - myproject requires >=3.0 && <3.3
    yaml version 0.11.3.0 found
        - myproject requires ==0.8.*
    Using package flags:
        - myproject: FlagName "dev" = False, FlagName "library-only" = False

I think to can fix to default selecting lts.
By fix package.yaml dependencies.

@snoyberg
Copy link
Member

Are you using the yesodweb/foo templates?

@amkhlv
Copy link
Contributor Author

amkhlv commented Apr 24, 2020

I am not sure, a bit confused with Stack templates. I just say stack new myproject yesod-simple in terminal... True, as ncaq said, it tries then various resolvers and settles down to lts-12.26, nothing later works...

@snoyberg
Copy link
Member

That's the problem. Use stack new foo yesodweb/simple instead.

@amkhlv
Copy link
Contributor Author

amkhlv commented Apr 24, 2020

OK. Got it. Thank you ! Where is it documented?

@snoyberg
Copy link
Member

@amkhlv
Copy link
Contributor Author

amkhlv commented Apr 24, 2020

Ha-ha I've just seen this commit commercialhaskell/stack-templates@000f5d1 :)

@amkhlv
Copy link
Contributor Author

amkhlv commented Apr 24, 2020

I used stack new myproject yesodweb/simple . However, now Intero does not build:
stack build intero --copy-compiler-tool fails
`Error: While constructing the build plan, the following exceptions were encountered:

In the dependencies for intero-0.1.40:
ghc-8.8.3 from stack configuration does not match >=7.8 && <=8.6.5 (latest matching version is 8.6.5)
needed since intero is a build target.
`
I find it very hard to write Haskell without Intero...

@amkhlv
Copy link
Contributor Author

amkhlv commented Apr 24, 2020

Downgrading to lts-14.27 in stack.yaml, now Intero builds, but Hoogle, again, does not build: stack hoogle results in: `classy-prelude-yesod> error, called at utils/haddock/haddock-api/src/Haddock/Interface/Create.hs:1116:12 in main:Haddock.Interface.Create

-- While building package classy-prelude-yesod-1.5.0 using:
/home/andrei/.stack/setup-exe-cache/x86_64-linux-tinfo6/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.5 --builddir=.stack-work/dist/x86_64-linux-tinfo6/Cabal-2.4.0.1 haddock --html --hoogle --html-location=../$pkg-$version/ --haddock-option=--hyperlinked-source --haddock-option=--quickjump
Process exited with code: ExitFailure 1`

@ncaq
Copy link
Contributor

ncaq commented Apr 27, 2020

@amkhlv

The intero project has reached the end of its life cycle

Should use Alternatives.
chrisdone/intero

I use haskell-ide-engine for yesod development.

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

3 participants