Intellij-elixir: Issue with Elixir Module SDK in small IDEs

Created on 3 Jan 2019  路  10Comments  路  Source: KronicDeth/intellij-elixir

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.

Bug

Most helpful comment

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

All 10 comments

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.

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

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.

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.

Thanks Mike..
That really works..
WebStorm 2018.3.4

Can confirm it works with RubyMine 2018.3.4 as well.

Thanks

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

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.

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kandeshvari picture kandeshvari  路  5Comments

joshuataylor picture joshuataylor  路  3Comments

Nicholi picture Nicholi  路  6Comments

joshuataylor picture joshuataylor  路  7Comments

nhooyr picture nhooyr  路  3Comments