Skip to content
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

Hard to distinguish warnings and errors #3778

Open
ad-si opened this issue Jan 27, 2020 · 10 comments
Open

Hard to distinguish warnings and errors #3778

ad-si opened this issue Jan 27, 2020 · 10 comments

Comments

@ad-si
Copy link

ad-si commented Jan 27, 2020

At the moment it's really hard to visually distinguish warnings from errors:

image

It would be cool if the difference was more prominent. E.g. through using different colors and adding ASCII art for sectioning the output.

Maybe something like this (pseudocode for coloring):

<yellow>=== Warning 50 of 50:==================================================</yellow> 

  at src/Neodoc/Evaluate/Reduce.purs:97:16 - 97:17 (line 97, column 16 - line 97, column 17)

…

<red>=== Error 1 of 5===========================================================</red>

  at src/Neodoc/ArgParser/Parser.purs:685:1 - 740:48 (line 685, column 1 - line 740, column 48)

    An anonymous function argument appears in an invalid context.

…

What do you think?

@natefaubion
Copy link
Contributor

You might try purescript-psa for console based output.

@ad-si
Copy link
Author

ad-si commented Jan 27, 2020

I'm seeing this as output from spago build. Can I use psa with spago?
But this issues is about improving the default anyways 😉

@natefaubion
Copy link
Contributor

purescript/spago#252

@hdgarrood
Copy link
Contributor

psa is a good option for now, but I think this is worthy of considering; I'm also keen on improving the defaults. I'd be up for folding basically everything that psa does back into the main compiler. See also: #1898, #2308.

@natefaubion
Copy link
Contributor

Yes, as the author of psa, I too would prefer it was just a compiler default.

@ad-si
Copy link
Author

ad-si commented Jan 27, 2020

Look at this, psa does already seem to be the default for spago 😳:

$ spago --help
…
  -P,--no-psa              Don't build with `psa`, but use `purs`
…

But it doesn't seem to be used 🤔

@natefaubion
Copy link
Contributor

Maybe it needs to be globally installed?

@hdgarrood
Copy link
Contributor

I think it needs to be on your PATH.

@ad-si
Copy link
Author

ad-si commented Jan 27, 2020

Ah yes, either spago and purescript-psa are both installed locally or both globally, but the global spago doesn't pick up a local purescript-psa. Should maybe be implemented. Tools like webpack use the local version if they find one iirc.

@winston0410
Copy link

For anyone reading this, if you need to use spago with psa, simply install both globally. They will work together automatically.

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

No branches or pull requests

4 participants