aiken-lang / vscode-aiken

Aiken support for VS Code
https://github.com/aiken-lang/aiken
Apache License 2.0
16 stars 4 forks source link

Aiken language server, couldn't create a connection to server. #3

Open golddydev opened 1 year ago

golddydev commented 1 year ago

Hello, everyone. I am now creating smart contract on cardano using Aiken. In my opinion, this aiken language is really suitable for creating smart contract.

Only one problem I face is this issue.

[Error - 15:22:46] Aiken Language Server client: couldn't create connection to server.
Launching server using command aiken failed. Error: spawn aiken ENOENT

Can anybody help me?

rvcas commented 1 year ago

which operating system are you on?

golddydev commented 1 year ago

I am on ubuntu 22.04

rvcas commented 1 year ago

On Linux people have had issues with VSCode not having aiken in it's path

golddydev commented 1 year ago

On Linux people have had issues with VSCode not having aiken in it's path

So you mean, it is not with aiken extension but the fault is with the linux vs code. Right? Then how to fix this?

cauu commented 6 months ago

Is there any progress in this issue? I'm using a mac and encountered the same problem.

I think this is caused by reading $PATH from process.env in the extension.

I installed aiken in ~/.aiken/bin folder, but $PATH variables read by the extension was always "/usr/bin:/bin:/usr/sbin:/sbin", I can not mv aiken into these folders(mac's restrictions), and didn't find a way to modify $PATH variables for vscode progress.

golddydev commented 6 months ago

Is there any progress in this issue? I'm using a mac and encountered the same problem.

I think this is caused by reading $PATH from process.env in the extension.

I installed aiken in ~/.aiken/bin folder, but $PATH variables read by the extension was always "/usr/bin:/bin:/usr/sbin:/sbin", I can not mv aiken into these folders(mac's restrictions), and didn't find a way to modify $PATH variables for vscode progress.

Well, you can open vscode using terminal. In your project directory.

code .

This will fix the issue. I think it is related to VScode.

cauu commented 6 months ago

Is there any progress in this issue? I'm using a mac and encountered the same problem. I think this is caused by reading $PATH from process.env in the extension. I installed aiken in ~/.aiken/bin folder, but $PATH variables read by the extension was always "/usr/bin:/bin:/usr/sbin:/sbin", I can not mv aiken into these folders(mac's restrictions), and didn't find a way to modify $PATH variables for vscode progress.

Well, you can open vscode using terminal. In your project directory.

code . This will fix the issue. I think it is related to VScode.

Thanks, it works!

It seems the environment variables are different between starting from cli and gui, I think a better solution would be allowing user manually setting path to aiken binary file in the extension's configuration @rvcas