Skip to content

Regression in 2.15.7 #6621

Closed
Closed
@lehins

Description

@lehins

General summary/comments (optional)

I suspect #6542 introduced a regression, although I might be wrong. Problem happens with LTS-18 and older (was able to reproduce all the way to LTS-11)

Problem happens when building a package that depends on doctest, which depends on ghc-paths and that is where problem seems to pop up:

ghc-paths  > [1 of 2] Compiling Main             ( /tmp/stack-078a762c6f3e0bc1/ghc-paths-0.1.0.12/Setup.hs, /tmp/stack-078a762c6f3e0bc1/ghc-paths-0.1.0.12/.stack-work-root/dist/x86_64-linux/ghc-8.10.7/setup/Main.o )
ghc-paths  > [2 of 2] Compiling StackSetupShim   ( /home/lehins/.stack/setup-exe-src/setup-shim-HwdwpEmb.hs, /tmp/stack-078a762c6f3e0bc1/ghc-paths-0.1.0.12/.stack-work-root/dist/x86_64-linux/ghc-8.10.7/setup/StackSetupShim.o )
ghc-paths  > 
ghc-paths  > /home/lehins/.stack/setup-exe-src/setup-shim-HwdwpEmb.hs:10:1: error:
ghc-paths  >     parse error on input ‘import’
ghc-paths  >    |
ghc-paths  > 10 | import Data.List ( stripPrefix )
ghc-paths  >    | ^^^^^^

I was able to confirm that stack-2.15.5 and earlier do not have this problem

Steps to reproduce

$ ghcup install stack 2.15.7
$ ghcup set stack 2.15.7
$ git clone https://github.com/lehins/massiv
$ cd massiv
$ git reset --hard 026df670503ef7d7de77fa8a8691782c62618039
$ stack test --no-run-tests --stack-yaml stack.ghc-8.10.7.yaml 
....
        
ghc-paths  > configure
ghc-paths  > [1 of 2] Compiling Main             ( /tmp/stack-078a762c6f3e0bc1/ghc-paths-0.1.0.12/Setup.hs, /tmp/stack-078a762c6f3e0bc1/ghc-paths-0.1.0.12/.stack-work-root/dist/x86_64-linux/ghc-8.10.7/setup/Main.o )
ghc-paths  > [2 of 2] Compiling StackSetupShim   ( /home/lehins/.stack/setup-exe-src/setup-shim-HwdwpEmb.hs, /tmp/stack-078a762c6f3e0bc1/ghc-paths-0.1.0.12/.stack-work-root/dist/x86_64-linux/ghc-8.10.7/setup/StackSetupShim.o )
ghc-paths  > 
ghc-paths  > /home/lehins/.stack/setup-exe-src/setup-shim-HwdwpEmb.hs:10:1: error:
ghc-paths  >     parse error on input ‘import’
ghc-paths  >    |
ghc-paths  > 10 | import Data.List ( stripPrefix )
ghc-paths  >    | ^^^^^^
Progress 1/6

Error: [S-7282]
       Stack failed to execute the build plan.
       
       While executing the build plan, Stack encountered the error:
       
       [S-7011]
       While building package ghc-paths-0.1.0.12 (scroll up to its section to see the error) using:
       /home/lehins/.ghcup/ghc/8.10.7/bin/ghc --make -odir /tmp/stack-078a762c6f3e0bc1/ghc-paths-0.1.0.12/.stack-work-root/dist/x86_64-linux/ghc-8.10.7/setup -hidir /tmp/stack-078a762c6f3e0bc1/ghc-paths-0.1.0.12/.stack-work-root/dist/x86_64-linux/ghc-8.10.7/setup -i -i. -clear-package-db -global-package-db -package-db=/home/lehins/.stack/snapshots/x86_64-linux/68fff3243d98d9c862e3c86021fe4f03a8d73b9a01c3c73a570ab9f0b84b1e6e/8.10.7/pkgdb -package-db=/home/lehins/tmp/massiv/.stack-work-root/install/x86_64-linux/68fff3243d98d9c862e3c86021fe4f03a8d73b9a01c3c73a570ab9f0b84b1e6e/8.10.7/pkgdb -hide-all-packages -package-id=Cabal-3.2.1.0 -package-id=base-4.14.3.0 -package-id=directory-1.3.6.0 -optP-include -optP/tmp/stack-078a762c6f3e0bc1/ghc-paths-0.1.0.12/.stack-work-root/dist/x86_64-linux/ghc-8.10.7/setup/setup_macros.h /tmp/stack-078a762c6f3e0bc1/ghc-paths-0.1.0.12/Setup.hs /home/lehins/.stack/setup-exe-src/setup-shim-HwdwpEmb.hs -main-is StackSetupShim.mainOverride -o /tmp/stack-078a762c6f3e0bc1/ghc-paths-0.1.0.12/.stack-work-root/dist/x86_64-linux/ghc-8.10.7/setup/setup -threaded -haddock
       Process exited with code: ExitFailure 1 

Expected

No build failure.

Actual

Build failure

If you suspect that a Stack command misbehaved, please include the output of
that command in --verbose mode. If the output is larger than a page please
paste the output in a Gist.

stack <your command here> <args> --verbose
<output>

Stack version

$ stack --version
Version 2.15.7, Git revision 75bb479f04755c1daf91ec8f445e17e2ba2ab7a3 x86_64 hpack-0.36.0

Method of installation

  • Via GHCup

Platform

Linux x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions