Skip to content
Snippets Groups Projects
Unverified Commit c07f9998 authored by Colton Clemmer's avatar Colton Clemmer Committed by GitHub
Browse files

Do not print "up to date" unless running build (#8569)


* do not print "up to date" unless running build

* Update cabal-tests

* Add changelog

* Remove accidentally added test generated files

Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 09c90de3
No related branches found
No related tags found
No related merge requests found
......@@ -863,24 +863,22 @@ printPlan verbosity
PackageConfig {packageConfigOptimization = globalOptimization},
projectConfigLocalPackages =
PackageConfig {packageConfigOptimization = localOptimization}
}
},
currentCommand
}
ProjectBuildContext {
elaboratedPlanToExecute = elaboratedPlan,
elaboratedShared,
pkgsBuildStatus
}
| null pkgs
= notice verbosity "Up to date"
| otherwise
= noticeNoWrap verbosity $ unlines $
| null pkgs && currentCommand == BuildCommand
= notice verbosity "Up to date"
| not (null pkgs) = noticeNoWrap verbosity $ unlines $
(showBuildProfile ++ "In order, the following "
++ wouldWill ++ " be built"
++ ifNormal " (use -v for more details)" ++ ":")
: map showPkgAndReason pkgs
| otherwise = return ()
where
pkgs = InstallPlan.executionOrder elaboratedPlan
......
......@@ -5,5 +5,4 @@ In order, the following will be built:
- fake-package-0 (exe:cabal-script-script.hs) (first run)
Configuring executable 'cabal-script-script.hs' for fake-package-0..
Building executable 'cabal-script-script.hs' for fake-package-0..
# cabal v2-run
Up to date
# cabal v2-run
\ No newline at end of file
......@@ -14,7 +14,7 @@ Configuring executable 'bar' for MultipleExes-1.0..
Preprocessing executable 'bar' for MultipleExes-1.0..
Building executable 'bar' for MultipleExes-1.0..
# cabal v2-run
Up to date
# cabal v2-run
Error: cabal: The run command is for running a single executable at once. The target '' refers to the package MultipleExes-1.0 which includes
- executables: bar and foo
......
......@@ -7,7 +7,6 @@ Configuring executable 'bar-exe' for bar-1.0..
Preprocessing executable 'bar-exe' for bar-1.0..
Building executable 'bar-exe' for bar-1.0..
# cabal v2-run
Up to date
# cabal v2-run
Build profile: -w ghc-<GHCVER> -O1
In order, the following will be built:
......
......@@ -6,4 +6,3 @@ In order, the following will be built:
Configuring executable 'cabal-script-script.hs' for fake-package-0..
Building executable 'cabal-script-script.hs' for fake-package-0..
# cabal v2-run
Up to date
......@@ -7,12 +7,8 @@ Configuring executable 'foo' for Single-1.0..
Preprocessing executable 'foo' for Single-1.0..
Building executable 'foo' for Single-1.0..
# cabal v2-run
Up to date
# cabal v2-run
Up to date
# cabal v2-run
Up to date
# cabal v2-run
Up to date
# cabal v2-run
Error: cabal: Cannot run the package bar, it is not in this project (either directly or indirectly). If you want to add it to the project then edit the cabal.project file.
synopsis: Do not print "up to date" for commands unless running "cabal build"
packages: Cabal
issues: #4994
prs: #8569
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment