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
recompilation errors go to stderr, not xmonad.errors #403
Comments
It's quite reliable here: nothing useful in the error popup generated from |
Mh, it works perfectly fine here, but I do have my config in its own stack project with a build file1. I will try to reproduce this with just the stack/ghc setup that we support ootb. Footnotes
|
Okay, I've now tried this with both our stack and ghc setups and can't reproduce it at all. Can you perhaps create a repo or something with a reproducer? |
That's odd since I've reproduced it here with both my normal setup and one of my testing sandboxes. Maybe it is relevant that both use build scripts with cabal, though. (Neither is trivial, though, else they wouldn't be using build scripts….) |
And I have a minimal reproducer, again using cabal with a build script; see https://github.com/geekosaur/xmonad.hs/tree/xmonad-buildscript-fail. Compare |
Indeed, I can reproduce it with that. It seems like the build script (or cabal? I don't know) sends compilation errors to stdout and not stderr. When I do |
@geekosaur is this something that we can fix in a cabal build file? Is it a good idea to redirect stdout to |
I'm a bit surprised it's not already, to be honest. I could arrange for my build script and/or the cabal example build script to redirect stdout to stderr. I feel like it shouldn't be necessary, though. But this sounds like an upstream cabal issue, since it's redirecting stderr to stdout. |
Looks like there has been attempts haskell/cabal#4789 and, more recently, haskell/cabal#7838. The latter seems to be active, so hopefully this will get fixed soon. |
Not sure what changed as well, I have xmessage installed but errors are not displayed, only shown in the xmonad.errors file |
That would be a different issue: if they're making it to |
Problem Description
Recompilation errors go directly to standard error instead of the log file. This means that, to find out what actually went wrong with
xmonad --recompile
, you need to run it in a terminal. Otherwise, you get anxmessage
showing the build command but not its output, at least when using a build script (but IIRC these all use the same code path, sostack
andghc
should fail the same way).Steps to Reproduce
Introduce a syntax error into your config and press
mod-q
Configuration File
Checklist
I've read CONTRIBUTING.md
I tested my configuration
xmonad
version 0.17.0.9 (commit 521e835 if using git)xmonad-contrib
version XXX (commit XXX if using git)The text was updated successfully, but these errors were encountered: