Skip to content
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

track logging in PurePrompt state #9482

Open
aleeusgr opened this issue Nov 28, 2023 · 2 comments
Open

track logging in PurePrompt state #9482

aleeusgr opened this issue Nov 28, 2023 · 2 comments

Comments

@aleeusgr
Copy link
Contributor

aleeusgr commented Nov 28, 2023

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

@mpickering
Copy link
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
Copy link
Contributor Author

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
Projects
None yet
Development

No branches or pull requests

2 participants