Closed kaminsod closed 4 years ago
Thanks for reporting!
I can't reproduce your issue and also wonder if the lines in the Event log relates to the error.
Can you give some more info about how to reproduce this issue?
This was done right after updating intellij to 2020.2.1 and installing the plugin version 1.0.0-beta78, with all the necessary restarts.
There is no global stack in /usr/bin/stack.
The steps are exactly:
File -> New -> Project -> Haskell Module -> (select user's local stack - version 2.3.3) -> next -> finish
I'm not sure about the source of the event log, but the timestamp matches with the project creation time. It could be that it runs those commands while trying to detect the global stack install before project creation, or it tries to use /usr/bin/stack ignoring the user-selected stack path.
Does this issue prevent you from using the plugin?
This, along with https://github.com/rikvdkleij/intellij-haskell/issues/567 do prevent the creation of new haskell projects from intellij. However, I was able to work around the issue by creating a stack project from the command line, adding a symlink in /usr/bin/stack pointing to user's local stack, and importing the existing project. The plugin works when importing and working on an existing project.
Ok, good to know!
By the way, just wondering - how does the plugin detect stack? My local stack is in the path, and 'stack path' would return something like:
...
local-bin: /home/user/.local/bin
...
The local-bin seems like a better default than /usr/bin/stack.
The plugin doesn't detect stack. In a previous version the plugin was using stack from the PATH but that didn't work out for a number of users so I switched back to the SDK solution.
The plugin's stack path defaults are per OS.
The path to stack depends on how stack was installed but I have no problem with changing the default. See e.g. https://docs.haskellstack.org/en/stable/install_and_upgrade/
The local-bin seems like a better default than /usr/bin/stack.
That's something else. That's the folder which contains the binary after a stack install
in a project.
Ah, thanks for the explanation.
For ubuntu 19.10 and 20.04, I don't install the default stack
package because it's fairly old. Therefore there is no /usr/bin/stack
unless I explicitly create a symlink to (say) ~/.local/bin/stack
. I guess I don't understand the statement "PATH didn't work out". Why not? Wouldn't you do something like env
to find the correct executable with the correct switches?
Anyways, I can't really run an existing project from the plugin. Ubuntu 19.10, Intellij idea 2020.2.1, stack 2.3.3 and Intellij-Haskell 1.0.0-beta78. stack build
and stack run
at the command line both work. stack run --verbose
seems to do a lot of stuff which I don't yet understand. I'm pretty new to haskell and stack.
@mcarifio
Why not?
I was referring to issue #587
I can reproduce this issue on Ubuntu. So will fix this.
Awesome. Great plugin. Ty.
@rikvdkleij I just want to inform you that this bug also affects macOS. But we were able to restore an older .iml
file which we now have checked in git so that colleagues can also use your extension.
@ndrsllwngr Thanks for the info. The fix should also work for macOS.
@rikvdkleij Thank you a lot; your extension besides this bug works great and supports us in many ways!
Should be fixed in beta79.
Please reopen if still an issue.
Related, but somewhat different from: https://github.com/rikvdkleij/intellij-haskell/issues/567
Plugin version: 1.0.0-beta78 Intellij version: 2020.2.1
/home/user/.local/bin/stack
seems to detect the correct stack versionIn the event log:
So it seems to always fall back to /usr/bin/stack even when another path is selected.