See:
On Windows, the copy command of Cabal < 3.18 cannot handle long paths that are specified as relative paths.
However, Stack passes --builddir= to Cabal as a relative path. See withCabal of Stack.Build.ExecuteEnv.withSingleContext and its setupArgs.
See:
cabalcrashes in HLS CI while copying files haskell/cabal#11395 (comment)On Windows, the
copycommand ofCabal < 3.18cannot handle long paths that are specified as relative paths.However, Stack passes
--builddir=to Cabal as a relative path. SeewithCabalofStack.Build.ExecuteEnv.withSingleContextand itssetupArgs.