remove uses of warningIO
authorJoey Hess <joeyh@joeyh.name>
Wed, 2 Dec 2020 18:57:43 +0000 (14:57 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 2 Dec 2020 18:57:43 +0000 (14:57 -0400)
commit63839532c970b70c68d674f864249b58d129329d
tree527ad6b8124033177d94af0309c60c393bbecfa4
parent1858b65d88e64f7af71d2e98178a8dd94e9f9a7e
remove uses of warningIO

It's not concurrent-output safe, and doesn't support
--json-error-messages.

Using Annex.makeRunner is a bit scary, because what if it's run in a
different thread from an active annex action? Normally the same Annex
state is not used concurrently in several threads, and it's not designed
to be fully concurrency safe. (Annex.Concurrent exists to deal with
that.) I think it will be ok in these simple cases though. Eg,
when buffering a warning message to json, Annex.changeState is used,
and it modifies the MVar in a concurrency safe way.

The only warningIO remaining is not a problem.
Annex/Init.hs
Remote/External.hs
Remote/External/AsyncExtension.hs
Remote/Helper/Chunked/Legacy.hs
Remote/WebDAV.hs