KronicDeth / intellij-elixir

Elixir plugin for JetBrain's IntelliJ Platform (including Rubymine)
Other
1.83k stars 153 forks source link

Issue with Elixir Module SDK in small IDEs #1378

Closed JerryBels closed 5 years ago

JerryBels commented 5 years ago

Hello,

(On PHPStorm).

Having already two projects configured correctly, I know that I have to select the Elixir facet SDK - but today I cloned two projects, an umbrella app from our company and https://github.com/socialpaymentsbv/ex_phone_number - and had issues.

First, the "Setup Elixir Module SDK" (and not facet now as it appears ?) link on top is not opening settings like it always did. And if I go to settings, I have no option in the Elixir menu. I can select a SDK in the SDKs menu and in the Internal Erlang SDKs menu, but it doesn't change anything.

One more issue with the umbrella project : it shows on the menu the list of apps that are in the "apps" directory, instead of root of the project. I'm not sure whether it's intended or not - I read something about that in the last update but I'm not sure how to understand it. Also, the root folders config, deps and env doesn't appear anywhere, and tools appears at the same level as folders from the apps folder.

Flaires commented 5 years ago

I can confirm this issue. The same problem occurs in WebStorm. You cannot click on the SDK link to the setting menu. Also the SDK isn't found. The warning message Unknown Module Type Cannot determine module type ("ELIXIR_MODULE") for the following module:"myfile" The module will be treated as a Unknown module. is shown.

wernerlaude commented 5 years ago

I can confirm this issue in both WS and RM latest versions. It is possible to open an older phx project (few month) and all works fine. The Elixir env. is editable in the preferences and shows the correct env. But not a fresh created "mix new projectname". Link is clickable but does not do anything, which is in a way logically because there is nothing to choose in the box

bildschirmfoto 2019-01-08 17-46-56

preferences 2019-01-08 17-44-18

drl123 commented 5 years ago

Having the same issue here on RM OSX.

Here's what I noticed...I couldn't set the Ruby SDK either, which from this plugin's installation instructions is required in order to set the Elixir as an addon module. If I start an empty Ruby project from the IDE and specify the Ruby SDK in that creation wizard, then from an external terminal do mix new with the same directory/project name, it creates the Elixir project leaves the Ruby SDK set, then I can set the Elixir SDK. It ain't pretty, but it at least allows us to work.

Given that, it may actually be an issue on the JetBrains side, not this plugin. Don't know why it won't even let you set the Ruby SDK in a project you just open from a random folder anymore...probably a regression in the latest version.

mike-kasianov commented 5 years ago

Got same issue on RubyMine. Here are some steps helped me to get rid of this message:

  1. Open your_project_name.iml file in the root of your project and change ELIXIR_MODULE to RUBY_MODULE.
  2. Restart IDE. Now you are allowed to select Elixir SDK in IDE setting.
wernerlaude commented 5 years ago

Thanks Mike.. That really works.. WebStorm 2018.3.4

storm255 commented 5 years ago

Can confirm it works with RubyMine 2018.3.4 as well.

Thanks

drl123 commented 5 years ago

Yep, works for me too. RubyMine 2018.3.4 on OSX.

rossvz commented 5 years ago

Had the same issue recently with Webstorm 2018.3.4 and a new Phoenix/Elixir project. Deleted the <project-name>.iml file along with .idea folder for the project and reopened Webstorm. Had to reconnect the SDK, but after that, plugin seems to be working as far as I can tell.

JerryBels commented 5 years ago

Got same issue on RubyMine. Here are some steps helped me to get rid of this message:

  1. Open your_project_name.iml file in the root of your project and change ELIXIR_MODULE to RUBY_MODULE.
  2. Restart IDE. Now you are allowed to select Elixir SDK in IDE setting.

This does work - for PHPStorm you got to user WEB_MODULE - but ... If then you browse one of your deps' code, the error message appears anew - and IDE is not friendly, not following ctrl+clicks or anything.

KronicDeth commented 5 years ago

Confirmed on https://github.com/socialpaymentsbv/ex_phone_number. Doesn't do it on 8.0.0, does do it on latest.