Skip to content

Conversation

@f-f
Copy link
Member

@f-f f-f commented Nov 6, 2019

This PR introduces the rio library, mostly to rehaul our logging situation: this replaces our logDebug/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:

$ spago init
[info] Initializing a sample project or migrating an existing one..
[info] Set up a local Spago project.
[info] Try running `spago build`

cc @Benjmhart: this introduces a logInfo that logs to stderr, so we can still use output for outputting to stdout

@Benjmhart
Copy link
Contributor

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?

@f-f
Copy link
Member Author

f-f commented Nov 7, 2019

@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 😄

@f-f f-f changed the title Introduce RIO Switch all the logging to RIO Nov 7, 2019
@f-f f-f merged commit 556be33 into master Nov 7, 2019
@f-f f-f deleted the introduce-rio branch November 7, 2019 15:49
@f-f f-f mentioned this pull request Apr 12, 2020
f-f added a commit that referenced this pull request Apr 14, 2020
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants