Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

"Switch Tab On Check" not working? #20

Closed
edsko opened this issue Jan 15, 2018 · 5 comments
Closed

"Switch Tab On Check" not working? #20

edsko opened this issue Jan 15, 2018 · 5 comments

Comments

@edsko
Copy link
Contributor

edsko commented Jan 15, 2018

After building finishes, it stays on the "Build" tab, rather than switch the "Error" tab, independent of whether this setting is checked or not.

@lierdakil
Copy link
Contributor

Well, that's kinda expected, although maybe not necessarily wanted. The idea here is as follows: the leftmost tab that has received messages is activated. Problem is, build output usually keeps going even after errors are reported. Maybe grouping messages that came in some reasonable time window (say, about 150 ms?) will resolve this.

@edsko
Copy link
Contributor Author

edsko commented Jan 15, 2018

I see. So what is your workflow here? Every time I build I then have to manually click on the 'Error' tab to see my compile errors.

@lierdakil
Copy link
Contributor

I usually see errors before building, actually, either via ghc-mod or ghci, so this doesn't bother me as much. I definitely see your point though, so I'm not saying that this isn't a problem. Just that it behaves exactly as intended by the implementation. I'll look into it in the next couple days.

Meanwhile, patching https://github.com/atom-haskell/ide-haskell/blob/master/lib/output-panel/index.js#L51 to read

this.activateFirstNonEmptyTab(this.tabs.keys());

should work, although with it's own set of challenges (f.ex. if there are warnings, it will lock on to warnings, regardless of anything else going on, etc)

@lierdakil
Copy link
Contributor

Okay, so I actually managed to find a bug in the implementation and fixing it helped somewhat. But I also added temporal grouping to messages just in case. Published as [email protected]

@edsko
Copy link
Contributor Author

edsko commented Jan 22, 2018

Indeed, much better! Thanks so much for the quick turnout, as always :)

@edsko edsko closed this as completed Jan 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants