haskell / haskell/cabal

Investigate possible regression regarding loss of exe-bits before configure phase

Open
#4,170 2 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/get Cabal: cmd/configure type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

@ezyang asked me to file this so we don't forget...

In https://hackage.haskell.org/package/qtah-generator-0.2.1/src/Setup.hs

I noticed the following bit hinting at either an unintended regression (or possibly an intended change?) in Cabal 1.24:

```hs
generateSources :: LocalBuildInfo -> IO ()
generateSources localBuildInfo = do
-- Generate binding sources for the generated C++ listener classes.
projectRootDir <- findProjectRootDir localBuildInfo
let genPath = projectRootDir "qtah-listener-gen"
program = simpleConfiguredProgram "qtah-listener-gen" $ FoundOnSystem genPath

-- Cabal 1.24 (GHC 8?) seems to remove the executable bit from
-- qtah-listener-gen before configuring, so we have to re-add it.
perms <- getPermissions genPath
unless (executable perms) $
setPermissions genPath $ setOwnerExecutable True perms

runProgram normal program ["--gen-hs-dir", "."]
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.