Skip to content
GitLab
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
4fd559ad
Commit
4fd559ad
authored
Oct 06, 2016
by
Edward Z. Yang
Committed by
GitHub
Oct 06, 2016
Browse files
Merge pull request #3919 from ezyang/pr/new-repl-noregister
Only reregister inplace package if we built it.
parents
8fa4d2ea
4a80b8e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
cabal-install/Distribution/Client/ProjectBuilding.hs
View file @
4fd559ad
...
...
@@ -422,12 +422,11 @@ checkPackageFileMonitorChanged PackageFileMonitor{..}
where
buildReason
=
BuildReasonEphemeralTargets
(
MonitorUnchanged
buildResult
_
,
MonitorUnchanged
mipkg
_
)
->
(
MonitorUnchanged
buildResult
_
,
MonitorUnchanged
_
_
)
->
return
$
Right
BuildResult
{
buildResultDocs
=
docsResult
,
buildResultTests
=
testsResult
,
buildResultLogFile
=
Nothing
,
buildResultLibInfo
=
mipkg
buildResultLogFile
=
Nothing
}
where
(
docsResult
,
testsResult
)
=
buildResult
...
...
@@ -883,8 +882,7 @@ buildAndInstallUnpackedPackage verbosity
setup
buildCommand
buildFlags
-- Install phase
mipkg
<-
annotateFailure
mlogFile
InstallFailed
$
do
annotateFailure
mlogFile
InstallFailed
$
do
--TODO: [required eventually] need to lock installing this ipkig so other processes don't
-- stomp on our files, since we don't have ABI compat, not safe to replace
...
...
@@ -919,8 +917,7 @@ buildAndInstallUnpackedPackage verbosity
Cabal
.
registerPackage
verbosity
compiler
progdb
HcPkg
.
MultiInstance
(
elabRegisterPackageDBStack
pkg
)
ipkg
return
(
Just
ipkg
)
else
return
Nothing
else
return
()
--TODO: [required feature] docs and test phases
let
docsResult
=
DocsNotTried
...
...
@@ -929,8 +926,7 @@ buildAndInstallUnpackedPackage verbosity
return
BuildResult
{
buildResultDocs
=
docsResult
,
buildResultTests
=
testsResult
,
buildResultLogFile
=
mlogFile
,
buildResultLibInfo
=
mipkg
buildResultLogFile
=
mlogFile
}
where
...
...
@@ -1070,8 +1066,7 @@ buildInplaceUnpackedPackage verbosity
-- PURPOSELY omitted: no copy!
mipkg
<-
whenReRegister
$
annotateFailureNoLog
InstallFailed
$
do
whenReRegister
$
annotateFailureNoLog
InstallFailed
$
do
-- Register locally
mipkg
<-
if
elabRequiresRegistration
pkg
then
do
...
...
@@ -1089,7 +1084,6 @@ buildInplaceUnpackedPackage verbosity
else
return
Nothing
updatePackageRegFileMonitor
packageFileMonitor
srcdir
mipkg
return
mipkg
-- Repl phase
--
...
...
@@ -1105,8 +1099,7 @@ buildInplaceUnpackedPackage verbosity
return
BuildResult
{
buildResultDocs
=
docsResult
,
buildResultTests
=
testsResult
,
buildResultLogFile
=
Nothing
,
buildResultLibInfo
=
mipkg
buildResultLogFile
=
Nothing
}
where
...
...
@@ -1133,10 +1126,13 @@ buildInplaceUnpackedPackage verbosity
|
elabBuildHaddocks
pkg
=
action
|
otherwise
=
return
()
whenReRegister
action
=
case
buildStatus
of
BuildStatusConfigure
_
->
action
BuildStatusBuild
Nothing
_
->
action
BuildStatusBuild
(
Just
mipkg
)
_
->
return
mipkg
whenReRegister
action
=
case
buildStatus
of
-- We registered the package already
BuildStatusBuild
(
Just
_
)
_
->
return
()
-- There is nothing to register
_
|
null
(
elabBuildTargets
pkg
)
->
return
()
|
otherwise
->
action
configureCommand
=
Cabal
.
configureCommand
defaultProgramDb
configureFlags
v
=
flip
filterConfigureFlags
v
$
...
...
cabal-install/Distribution/Client/ProjectBuilding/Types.hs
View file @
4fd559ad
...
...
@@ -177,17 +177,7 @@ type BuildOutcome = Either BuildFailure BuildResult
data
BuildResult
=
BuildResult
{
buildResultDocs
::
DocsResult
,
buildResultTests
::
TestsResult
,
buildResultLogFile
::
Maybe
FilePath
,
-- | If the build was for a library, this field will be @Just@;
-- otherwise, it will be @Nothing@. What about internal
-- libraries? This never occurs, because a build result is either
-- for a per-component build (in which case there won't
-- be multiple libraries), or a package with no internal
-- libraries (internal libraries with Custom setups are NOT
-- supported, and even if they were supported, we could
-- assume the Cabal library version was recent enough to
-- support per-component build.).
buildResultLibInfo
::
Maybe
InstalledPackageInfo
buildResultLogFile
::
Maybe
FilePath
}
deriving
Show
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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