Open ForNeVeR opened 4 years ago
Thanks for reporting!
separating this progress into stages (e.g. if, say, 7 libraries should be installed β then it should have 7 stages)
This is completely up to Stack, the plugin has no control. The only thing that plugin can do is parse the output of Stack.... and from that draw more detailed stages.
providing more useful information on every stage (I saw that stack usually prints the total progress to the console; IntelliJ-Haskell could extract this information and draw more accurate progress)
I don't see how to implement this, see also previous point.
providing the real console output from the build tools (as I said, stack is pretty okay at reporting progress, and, as a user, I feel that I'm being "robbed" of this information by not providing me the standard console, and only utilizing this less informative progress spinner)
The information in the progress bar of the background task is directly from Stack. I don't remove information from the Stack output.
Btw, I accept pull requests π
Btw, I accept pull requests π
Which exactly was my intention. Thanks for answer!
@ForNeVeR Do you intend to work on this? Otherwise I would suggest to close this issue.
Why? Was the progress somehow improved? If not, it is still a big issue (I heard other users complaining about it), disregard if I intend to work on it or not.
(Though I still do.)
Well, I don't know how to improve this because currently the output of Stack is shown to the user. The plugin doesn't remove info from the Stack output.
The Background task shows the information from Stack.
To see the output in a better way, one has enable the Event log.
The plugin doesn't remove info from the Stack output.
That was already your point before, but I see better progress reporting if I run Stack in terminal than when I run it in the IntelliJ.
And I'm sure this should be improved. Initial installation can take hours on some machines. We definitely shouldn't leave the user without any clues on the progress for hours; this is nonsense.
Probably Stack either hides some useful information itself when it feels it's running in a non-interactive mode (which we should be able to beat e.g. by running it in a PTY), or interferes with the way IntelliJ-Haskell reads its optput (which would be the most positive, since is easy to fix), or has some command-line options for programmatic progress reporting (which we'll have to check).
If nothing else helps, we'll have to raise a feature request at Stack, at least.
@ForNeVeR Thanks for your feedback!
Initial installation can take hours on some machines.
An option is increase the number of cores of the Stack command which installs the tools, see here http://github.com/rikvdkleij/intellij-haskell/blob/49a015e267ff3d241c12fa21cca0258754027525/src/main/scala/intellij/haskell/external/execution/StackCommandLine.scala#L82-L82. But I don't know if it will have negative side-effects on all kind of machines in general (making e.g. IntelliJ unresponsive).
The user has also the option to install the Haskell tools himself. E.g. by using Nix.
but I see better progress reporting if I run Stack in terminal than when I run it in the IntelliJ.
That's weird. Also if you compare this output with the Event log? I never noticed this but I will pay attention to this.
Just tested this with HLint.
I don't see a difference in output between stack install hlint
on the command line and the output I see in the Event log when I delete the cache. I'm using Ubuntu.
An option is increase the number of cores of the Stack command which installs the tools, see here http://github.com/rikvdkleij/intellij-haskell/blob/49a015e267ff3d241c12fa21cca0258754027525/src/main/scala/intellij/haskell/external/execution/StackCommandLine.scala#L82-L82. But I don't know if it will have negative side-effects on all kind of machines in general (making e.g. IntelliJ unresponsive).
:+1: :+1: Oh yes, please can we do this (or have it an option)? :pray:
e.g. my new(ish) CPU has 24 (virtual) cores and using only 2 for big builds seems a real shame.
@declension I can change the number of cores to use the half of the available cores?
@declension I can change the number of cores to use the half of the available cores?
Yes this sounds like a great start! Probably 0.75 would be a safe number too, but let's start with half?
@declension done in beta88, https://github.com/rikvdkleij/intellij-haskell/releases/tag/v1.0.0-beta88
On my machine, initial Haskell tool setup (after I've opened my first Haskell project) has taken about half an hour, and during all this time the only thing I was able to see was this spinning progress bar:
I do believe we could improve the initial experience by:
stack
usually prints the total progress to the console; IntelliJ-Haskell could extract this information and draw more accurate progress)stack
is pretty okay at reporting progress, and, as a user, I feel that I'm being "robbed" of this information by not providing me the standard console, and only utilizing this less informative progress spinner)I use IntelliJ-Haskell 1.0.0.-beta74 build on Windows, with the latest release Stack version.