Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
Packages
Cabal
Commits
5551eb3d
Commit
5551eb3d
authored
Aug 21, 2016
by
Edward Z. Yang
Browse files
Use recursive directory listing when sdist fails.
Signed-off-by:
Edward Z. Yang
<
ezyang@cs.stanford.edu
>
parent
5c6830bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/ProjectBuilding.hs
View file @
5551eb3d
...
...
@@ -1184,7 +1184,22 @@ buildInplaceUnpackedPackage verbosity
--TODO: [required eventually] this doesn't track file
--non-existence, so we could fail to rebuild if someone
--adds a new file which changes behavior.
allSrcFiles
<-
allPackageSourceFiles
verbosity
scriptOptions
srcdir
allSrcFiles
<-
let
trySdist
=
allPackageSourceFiles
verbosity
scriptOptions
srcdir
-- This is just a hack, to get semi-reasonable file
-- listings for the monitor
tryFallback
=
do
warn
verbosity
$
"Couldn't use sdist to compute source files; falling "
++
"back on recursive file scan."
filter
(
not
.
(
"dist"
`
isPrefixOf
`))
`
fmap
`
getDirectoryContentsRecursive
srcdir
in
if
elabSetupScriptCliVersion
pkg
>=
Version
[
1
,
17
]
[]
then
do
r
<-
trySdist
if
null
r
then
tryFallback
else
return
r
else
tryFallback
updatePackageBuildFileMonitor
packageFileMonitor
srcdir
timestamp
pkg
buildStatus
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment