spago
spago copied to clipboard
--quiet should report Spago errors
When using the --quiet flag, Spago doesn't report errors related to Spago (though purs compiler errors are still emitted). For example, if you create a fresh Spago project with spago init and then delete the console dependency and run the below, you get an error:
λ spago build
[info] Build succeeded.
[error] Some of your project files import modules from packages that are not in the direct dependencies of your project.
To fix this error add the following packages to the list of dependencies in your config:
- console
You may add these dependencies by running the following command:
spago install console
However, if you run with --quiet, you don't get any errors:
λ spago --quiet build
In most cases this probably isn't an issue -- you'll still get compiler errors emitted, which is surely the most common source of Spago halting -- but it becomes an issue if you for example run:
λ spago --quiet test
...because the tests won't be executed and if there's no compiler error then it's unclear why not. In this case it would be nice to see that Spago has halted because of the missing dependencies.
On second thought, if --quiet is needed for workflows where you really don't want any Spago output leaking through, then I understand why logging would just be disabled in general and we can close this.
On second thought, if
--quietis needed for workflows where you really don't want any Spago output leaking through, then I understand why logging would just be disabled in general and we can close this.
I tend to concur with this, but I think this issue raises a good question: should we quiet ALL output when the flag is passed? (i.e. also the one coming from external programs that we call, such as purs)
I think this might just be a philosophical question at the current moment - I'll close this for now, and let's reopen it once we stumble across issues in the wild