-
Notifications
You must be signed in to change notification settings - Fork 134
Switch all the logging to RIO #486
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
Conversation
|
Does this cover all the cases for application output vs application logging that you described, or is there still more work to be done with respect to logging? |
|
@Benjmhart initially I thought I'd just introduce the library here and then we could switch the logging in a separate PR, but things kind of snowballed (because of porting the test fixtures to the new format) so I guess I'll tackle everything in this PR 😄 |
This (rather large, sorry for that) refactoring completes the work of introducing RIO that started in #486 The reason for this PR is to tidy up the "execution requirements" of every command - i.e. what does every command need in order to run. For how the code is structured now this will allow us to request "capabilities" in functions where we need them. Example: there's now a `HasPurs` typeclass that gives the path of the compiler. If there's no `purs` we now fail right at the beginning with a decent error message, rather than deep in the execution tree when we actually need to run it. This is a breaking change because it removes the deprecated `--no-share-output` flag for build commands.
This PR introduces the
riolibrary, mostly to rehaul our logging situation: this replaces ourlogDebug/logError/etc. with rio's own functions.This is to reduce the amount of code that we have to write here to support logging, and to get some logging goodies for free, e.g. colors and timestamps in debug logs.
Sample of the new logging format:
cc @Benjmhart: this introduces a
logInfothat logs tostderr, so we can still useoutputfor outputting tostdout