You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stack build [target] no longer works, builds all targets #3229
I think this was the result of switching from using runhaskell Setup.hs install to copy + register - f71a515 . copy fails if it can't find every executable, and there's no way in released cabal to tell it to only copy particular targets. There was a patch well before the most recent cabal release, but for some reason it is only available on master. So, with future cabal this may be fixable.
Installing library in
/Users/michael/.cabal/lib/x86_64-osx-ghc-8.0.2/foo-0.1.0.0-K7FRl2SdaSPJF1E2Gf1Eav
Installing executable(s) in /Users/michael/.cabal/bin
Warning: The directory /Users/michael/.cabal/bin is not in the system search
path.
dist/build/foo-exe/foo-exe: copyFile: does not exist (No such file or
directory)
The problem: Cabal (the library) will fail and die if you call the copy command when some of the executables are unavailable.
Original solution: oh well, user will get an error message, realize he/she has to call build once without arguments, and then can give components.
Current solution: never tell build to only build a subset of components, since that can lead to copy failing.
Proposed solution: before calling Cabal build, Stack should check if all executables are built. If they are, pass in components. Otherwise, give a logInfo that we're building all components once, and then future calls will build individual components.
Activity
snoyberg commentedon Jun 27, 2017
Let's finally set to rest the theory that it's the switch from
installtocopy/register(it's not):Results in:
snoyberg commentedon Jun 27, 2017
The problem: Cabal (the library) will fail and die if you call the
copycommand when some of the executables are unavailable.Original solution: oh well, user will get an error message, realize he/she has to call
buildonce without arguments, and then can give components.Current solution: never tell
buildto only build a subset of components, since that can lead tocopyfailing.Proposed solution: before calling
Cabal build, Stack should check if all executables are built. If they are, pass in components. Otherwise, give alogInfothat we're building all components once, and then future calls will build individual components.chrisdone commentedon Jun 28, 2017
Found the related commit: dc6313f
WIP: Build all exes once; then only specified (#3229)
Build all exes once; then only specified (#3229)
Build all exes once; then only specified (#3229)
Build all exes once; then only specified (#3229)
Include package name in exes message (#3229)
snoyberg commentedon Jul 13, 2017
Merged to master, closing.