Skip to content

track logging in PurePrompt state #9482

Open
@aleeusgr

Description

@aleeusgr
Contributor

Describe the feature request
add a parameter to add a log queue accumulator in the prompt state:

type LogQueue = [Text]

newtype PurePrompt a = PurePrompt
{ _runPrompt
    :: NonEmpty String
    -> Either BreakException (a, NonEmpty (LogQueue, String))
}
deriving (Functor)

Additional context
Fixing a bug #9346 a suggested testing strategy is to parse log outputs to confirm that the changes to the code had the desired effect. To achieve this the requested changes were suggested.

Thanks to @emilypi for the code suggestion and the collaboration

Activity

mpickering

mpickering commented on Nov 28, 2023

@mpickering
Collaborator

If the goal here is to write a test then it seems much simpler to add a test to cabal-testsuite/PackageTests than adding a unit test.

aleeusgr

aleeusgr commented on Nov 28, 2023

@aleeusgr
ContributorAuthor

It's a more general enhancement that would allow automating tests for changes related to logging in cabal-install.

Is it not?

I'm sorry, the description could be more specific.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mpickering@aleeusgr

        Issue actions

          track logging in PurePrompt state · Issue #9482 · haskell/cabal