-
Notifications
You must be signed in to change notification settings - Fork 701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept tests megapatch #4337
Merged
Merged
Accept tests megapatch #4337
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
c168155
Use a real normalise in Haddock.
ezyang 5c617af
Refactor setupMessage use in Cabal library.
ezyang e75f1ef
Make LogProgress abstract.
ezyang 3e5d313
Add an environment to LogProgress.
ezyang dc0ac12
Only emit progress when tracing calls for it.
ezyang c09ee45
Add context to error messages.
ezyang 2e989cb
Rewrite mix-in linking for error reporting, fix bugs.
ezyang 922da85
More clearly demarcate multiple errors.
ezyang 43de84c
Add verbosityNoFlags function.
ezyang aede673
Add verboseHasFlags function.
ezyang 237db17
Add infoNoWrap method
ezyang 6aefdf2
Propagate verbosity flags from cabal-install to Cabal
ezyang d5aee7d
Refactor Verbosity module with some helper functions.
ezyang aa915a7
Don't wrap 'Installing library' message
ezyang 08a9135
Run cabal-testsuite first when testing.
ezyang b3c17a5
Don't run LibV09 tests unless we have Cabal to build against
ezyang 27da34a
Custom tests require hasCabalForGhc
ezyang fa1d086
Add missing default-languages
ezyang 8cf2e4b
Put cabal-tests test output into a logfile by default.
ezyang e9da0bb
Don't show installedUnitId in plans unless in debug mode.
ezyang f77961c
The --deterministic flag tries to make Cabal deterministic.
ezyang 7c6670b
Add hasProfiledLibraries check for tests using profiling.
ezyang 426cfe6
Marked output support in Setup
ezyang afcbcb3
New variant of die which takes verbosity.
ezyang c84b008
Don't mark Haddock warnings, which depend on installation.
ezyang 2ac0cd5
Don't mark missing package servers warning.
ezyang 0e85616
Bugfix for has profiled
ezyang be1e1c6
Expect tests for cabal-testsuite.
ezyang 42e0d4f
TODO on ModuleProvides/ModuleRequires newtype.
ezyang 6ee79b1
See if cabal-install improvements speed up enough to ditch timeouts
ezyang 34be45f
Suppress marking when we lessVerbose.
ezyang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
{-# LANGUAGE Rank2Types #-} | ||
{-# LANGUAGE FlexibleContexts #-} | ||
module Distribution.Backpack.DescribeUnitId where | ||
|
||
import Prelude () | ||
import Distribution.Compat.Prelude | ||
|
||
import Distribution.Types.ComponentName | ||
import Distribution.Compat.Stack | ||
import Distribution.Verbosity | ||
import Distribution.ModuleName | ||
import Distribution.Package | ||
import Distribution.Text | ||
import Distribution.Simple.Utils | ||
|
||
import Text.PrettyPrint | ||
|
||
-- Unit identifiers have a well defined, machine-readable format, | ||
-- but this format isn't very user-friendly for users. This | ||
-- module defines some functions for solving common rendering | ||
-- problems one has for displaying these. | ||
-- | ||
-- There are three basic problems we tackle: | ||
-- | ||
-- - Users don't want to see pkg-0.5-inplace-libname, | ||
-- they want to see "library 'libname' from 'pkg-0.5'" | ||
-- | ||
-- - Users don't want to see the raw component identifier, which | ||
-- usually contains a wordy hash that doesn't matter. | ||
-- | ||
-- - Users don't want to see a hash of the instantiation: they | ||
-- want to see the actual instantiation, and they want it in | ||
-- interpretable form. | ||
-- | ||
|
||
-- | Print a Setup message stating (1) what operation we are doing, | ||
-- for (2) which component (with enough details to uniquely identify | ||
-- the build in question.) | ||
-- | ||
setupMessage' :: Text a => Verbosity | ||
-> String -- ^ Operation being done (capitalized), on: | ||
-> PackageIdentifier -- ^ Package | ||
-> ComponentName -- ^ Component name | ||
-> Maybe [(ModuleName, a)] -- ^ Instantiation, if available. | ||
-- Polymorphic to take | ||
-- 'OpenModule' or 'Module' | ||
-> IO () | ||
setupMessage' verbosity msg pkgid cname mb_insts = withFrozenCallStack $ do | ||
noticeDoc verbosity $ | ||
case mb_insts of | ||
Just insts | not (null insts) -> | ||
hang (msg_doc <+> text "instantiated with") 2 | ||
(vcat [ disp k <+> text "=" <+> disp v | ||
| (k,v) <- insts ]) $$ | ||
for_doc | ||
_ -> | ||
msg_doc <+> for_doc | ||
|
||
where | ||
msg_doc = text msg <+> text (showComponentName cname) | ||
for_doc = text "for" <+> disp pkgid <<>> text ".." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "prime" naming convention is from your other work on taking a
Verbosity
flag, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not really much of a naming convention. In this case, the prime means, "and takes more arguments".