cabal icon indicating copy to clipboard operation
cabal copied to clipboard

"Make targetDir relative to current directory" often doesn't work

Open sheaf opened this issue 1 year ago • 0 comments

In #7581, a call to makeRelativeToCurrentDirectory was added in an attempt to shorten command lines. However, in practice, this call to makeRelative will fail to make the path relative. For example, with a directory structure like

cabal.project
p/p.cabal

when building p the arguments will look like:

buildTargetDir_absolute = /long/working/directory/build/dist-newstyle/more/stuff/
currentWorkingDirectory = /long/working/directory/p/

Note the /p/ at the end of the current working directory, which means that we fail to make the build target directory relative to the current working directory.

The tests keep-going, regression/3324 and local-tarball in the integration-tests2 testsuite all fail if one adds an error after that invocation of makeRelativeToCurrentDirectory when it doesn't make the path relative.

sheaf avatar Mar 04 '24 13:03 sheaf