intellij-elixir icon indicating copy to clipboard operation
intellij-elixir copied to clipboard

Can't set up SDK

Open quetsalkoatl opened this issue 1 year ago • 18 comments

Describe the bug I'm new to Elixir and Erlang and tried to set up the SDK in the IntelliJ plugin but wasn't able to do so. No matter what I try I get the error "Internal Erlang SDK is not in Elixir SDK. Set it before picking this Elixir SDK". And I'm pretty sure I set up the Erlang SDK before picking the Elixir SDK.

I'm on Windows 10 and installed both Erlang and Elixir through the Windows installer in D:\Programs...

I'm probably doing something wrong here but I couldn't find another way to get support.

To Reproduce Steps to reproduce the behavior:

  1. Install Erlang and Elixir with Windows installer
  2. Setup new Elixir project in IntelliJ
  3. Setup new Erlang and Elixir SDK as asked by pop-ups
  4. Choose SDK
  5. Click Create

Expected behavior I should be able to create an Elixir project after setting up and choosing Elixir SDK.

Screenshots image image image image

Logs none

Desktop:

  • OS: Windows 10
  • Version: 10.0.19045 Build 19045

Erlang:

  • Installer: Windows 64-bit installer
  • Version: 27.1.2

Elixir:

  • Installer: Windows installer
  • Version: 1.17.3 (OTP 27)

Plugin:

  • Version: 19.0.1

quetsalkoatl avatar Nov 03 '24 14:11 quetsalkoatl

I was able to get it working by setting up the Elixir SDK through the "Project Structure" dialogue on another (non-Elixir) project. Then I could choose the SDK in the "New Project" dialogue without the error. But I still think this is a bug.

I also figured out that "elixir-tut" is not a valid app name so I changed it to "elixir_tut". Is it possible that that caused the issue and it just displayed the wrong error?

quetsalkoatl avatar Nov 03 '24 14:11 quetsalkoatl

I had the same issue on MacOS with libs installed through brew. Also new to Elixir and unfortunately it halted my progress, with using IntelliJ, as didn’t know how to work around it.

alanbem avatar Nov 16 '24 06:11 alanbem

I'll see if I can figure out a good workaround for this..

Unfortunately Jetbrains has changed how SDKs work, so there are a few wonky bugs with setting up the SDK, I have been unable to replicate it locally, but I'm going to put effort into instead focusing on hopefully implementing how they want custom languages to be done in 2024.x+ IDEs.

On Sat, 16 Nov 2024 at 14:32, Alan Gabriel Bem @.***> wrote:

I had the same issue on MacOS with libs installed through brew. Also new to Elixir and unfortunately it halted my progress, with using IntelliJ, as didn’t know how to work around it.

— Reply to this email directly, view it on GitHub https://github.com/KronicDeth/intellij-elixir/issues/3659#issuecomment-2480449796, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABW62Z23LR3QFSTKMQ3RYT2A3RHVAVCNFSM6AAAAABRCYS4QCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBQGQ2DSNZZGY . You are receiving this because you are subscribed to this thread.Message ID: @.***>

joshuataylor avatar Nov 16 '24 07:11 joshuataylor

FWIW, I can't get run or test to work on Erlang 27 at all in Webstorm. I had to go back to 26.latest to get over a bunch of obscure errors.

jdmarshall avatar Feb 23 '25 20:02 jdmarshall

I just ran in to this issue in pycharm and erlang 27. No matter what folder I select it says that it is invalid

fictitiouswizard avatar Sep 05 '25 17:09 fictitiouswizard

I just ran in to this issue in pycharm and erlang 27. No matter what folder I select it says that it is invalid

Can you try the latest ZIP https://github.com/KronicDeth/intellij-elixir/pull/3711

joshuataylor avatar Sep 06 '25 00:09 joshuataylor

Can you try the latest ZIP #3711

This worked for me. Thank you!

fictitiouswizard avatar Sep 06 '25 19:09 fictitiouswizard

Can you try the latest ZIP #3711

This worked for me. Thank you!

I may have been premature in my celebration. While I was able to add the erlang and elixir SDKs they don't appear to be working correctly. I don't have any ide features intellisense, jump to definition, etc or they ability to run tests. I get an error about the erlang sdk not being present.

Image Image Image Image Image

fictitiouswizard avatar Sep 06 '25 20:09 fictitiouswizard

Which IDE is that?

joshuataylor avatar Sep 06 '25 20:09 joshuataylor

Pycharm

fictitiouswizard avatar Sep 06 '25 20:09 fictitiouswizard

Erlang is installed to c:\tools\Erlang OTP if that is needed

fictitiouswizard avatar Sep 06 '25 20:09 fictitiouswizard

I'll have another EAP out to fix this, looks like there is another writeAction that is causing issues.

joshuataylor avatar Sep 06 '25 20:09 joshuataylor

Awesome thank you!

fictitiouswizard avatar Sep 06 '25 20:09 fictitiouswizard

@fictitiouswizard Do you mind posting in https://github.com/KronicDeth/intellij-elixir/pull/3711 with any feedback - I've got a intellij-elixir-eap2025-3.zip there - can you try a non-umbrella app, and see if you can add an Erlang SDK, save and close settings, reopen, add Elixir, save and close, and change selection to Elixir in the dropdown?

If so, and your goto definition works to dependencies on a non-umbrella app, I'll push a EAP4 tidyup this morning.

joshuataylor avatar Sep 07 '25 02:09 joshuataylor

@joshuataylor oh wow you replied quickly :D I just deleted my comment because I saw the issue about 2025 not being supported yet :D

KarimElsayad247 avatar Oct 17 '25 09:10 KarimElsayad247

I'll try the latest EAP build

KarimElsayad247 avatar Oct 17 '25 09:10 KarimElsayad247

By latest EAP build you mean InelliJ or the plug in itself?

KarimElsayad247 avatar Oct 17 '25 09:10 KarimElsayad247

Latest EAP build, sorry - the plugin.

No problems - any feedback, please leave in the other thread.

I'm hoping to finish the PSI (syntax highlighting) this weekend, for the LSP work :)

joshuataylor avatar Oct 17 '25 09:10 joshuataylor