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

Documentation: Paths for Graphical Editors. #785

Open
Tralen opened this issue May 22, 2020 · 4 comments
Open

Documentation: Paths for Graphical Editors. #785

Tralen opened this issue May 22, 2020 · 4 comments
Labels

Comments

@Tralen
Copy link

Tralen commented May 22, 2020

Greetings,

I got this message when running ghcide with Sublime Text 3:

1:1   compiler    error   cabal: streamingProcess: runInteractiveProcess: exec: does not exist (No such file or directory)

I realize this is due to Sublime picking the PATH from .profile and not from .bashrc, so it was easy to solve. However, ghcup instructs the user to add the ~/.cabal/bin and ~/.ghcup/bin paths to .bashrc, preferentially, and the same is true for stack, so I believe this is what most people do.

Other graphical editors load the environment the same way and I suspect the issue will reappear over and over. So I suggest an amendment to the install or troubleshooting section, please correct it if it is wrong.

Path

Your editor must be able to find all needed executables (ghcide, ghc, cabal-install, stack...) in the Path environment it uses. If you get errors that mention: does not exist (No such file or directory), verify that your Path is correct.

If you are using a graphical editor (Atom, VS Code, Sublime Text...) make sure the Path is set in the file from where the environment is loaded. Those editors may read only .profile and not .bashrc, unless they are launched from the terminal.

@Avi-D-coder
Copy link
Collaborator

It worse with vscode. If your ~/.profile uses [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec startx &> .debug_x vscode is just broken, there is no fix, but it's a vscode issue not a ghcup issue.

@IronGremlin
Copy link

This feels like an advisory notice for LSP plugin authors to me. Does there exist an appropriate place in project documentation to slot this in?

@pepeiborra pepeiborra transferred this issue from haskell/ghcide Jan 1, 2021
@jneira
Copy link
Member

jneira commented Jan 12, 2021

@IronGremlin I think the section about configuring editors could be a good place to put the suggestion: https://github.com/haskell/haskell-language-server#configuring-your-editor (in the initial section before the specific ones for each editor)

@jneira
Copy link
Member

jneira commented Dec 3, 2021

This is a frequent source of confusion and bad experience for users, it seems there are a dozen of ways to extend the PATH, depending on os (linux or macos), used shell (bash, zhs, etc) and windows manager. So it is necessary add it to trouebloshooting imo

As a example a recent issue in the vsocde extension: haskell/vscode-haskell#492

//cc @michaelpj

@fendor fendor added type: support User support tickets, questions, help with setup etc. and removed old_type: documentation labels Jul 13, 2022
@michaelpj michaelpj removed the type: support User support tickets, questions, help with setup etc. label Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants