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

Runtime errors using stack and ghc-8.6.4/ghc-8.4.4 on windows #91

Closed
jneira opened this issue Jan 12, 2020 · 1 comment · Fixed by #93
Closed

Runtime errors using stack and ghc-8.6.4/ghc-8.4.4 on windows #91

jneira opened this issue Jan 12, 2020 · 1 comment · Fixed by #93

Comments

@jneira
Copy link
Collaborator

jneira commented Jan 12, 2020

Error running the test suite with stack and ghc-8.6.4

Catched in the test suite of haskell-ide-engine: https://dev.azure.com/jneira/haskell-ide-engine/_build/results?buildId=434
With other ghc versions it works fine.
Maybe it can affect the normal use of hie (pending of testing)
Error:

src\CabalHelper\Compiletime\CompPrograms.hs:95:5: 
  1) CabalHelper, cabal-helper spec, cradle discovery, dummy filepath, finds none-cradle, stack repo, dummy filepath
       uncaught exception: IOException of type UserError
       user error (Pattern match failure in do expression at src\CabalHelper\Compiletime\CompPrograms.hs:95:5-17)

createProgSymlink :: FilePath -> FilePath -> IO ()
createProgSymlink bindir target
| [exe] <- splitPath target = do
Just exe_path <- findExecutable exe
createSymbolicLink exe_path (bindir </> takeFileName target)
| otherwise = do
cwd <- getCurrentDirectory
createSymbolicLink (cwd </> target) (bindir </> takeFileName target)

@jneira jneira changed the title Runtime error using stack, ghc-8.6.4 on windows Runtime error using stack and ghc-8.6.4 on windows Jan 12, 2020
@jneira
Copy link
Collaborator Author

jneira commented Jan 22, 2020

I've found another slightly diff error running with cabal (but no with stack) and ghc-8.4.4:

Failures:

  src\CabalHelper\Compiletime\Program\Stack.hs:88:19: 
  1) CabalHelper, cabal-helper spec, cradle discovery, dummy filepath, finds none-cradle, stack repo, dummy filepath
       uncaught exception: PatternMatchFail
       src\CabalHelper\Compiletime\Program\Stack.hs:88:19-59: Irrefutable pattern failed for pattern (key,
                                                              ' ' : val)

paths :: QueryEnvI c 'Stack -> FilePath -> IO (String -> FilePath)
paths qe@QueryEnv{qeProjLoc=ProjLocStackYaml stack_yaml} cwd
= do
out <- readStackCmd qe (Just cwd) $
workdirArg qe ++ [ "path", "--stack-yaml="++stack_yaml ]
return $ \k -> let Just x = lookup k $ map split $ lines out in x
where
split l = let (key, ' ' : val) = span (not . isSpace) l in (key, val)

@jneira jneira changed the title Runtime error using stack and ghc-8.6.4 on windows Runtime errors using stack and ghc-8.6.4/ghc-8.4.4 on windows Jan 22, 2020
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

Successfully merging a pull request may close this issue.

1 participant