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

Cannot Detect SDK Version when using conda package manager #489

Open
inkblot opened this issue Nov 1, 2016 · 2 comments
Open

Cannot Detect SDK Version when using conda package manager #489

inkblot opened this issue Nov 1, 2016 · 2 comments
Assignees

Comments

@inkblot
Copy link

inkblot commented Nov 1, 2016

When I follow the directions in the README for adding an SDK that was not auto-detected, I get the error dialog with title "Cannot Detect SDK Version" and message "Probably SDK installed in '/path/to/sdk/lib/elixir' is corrupt. In the idea.log I see this stack trace:

java.lang.IllegalArgumentException: Must specify non-empty 'commandLine' parameter
        at com.intellij.execution.process.BaseOSProcessHandler.<init>(BaseOSProcessHandler.java:65)
        at com.intellij.execution.process.OSProcessHandler.<init>(OSProcessHandler.java:68)
        at com.intellij.execution.process.CapturingProcessHandler.<init>(CapturingProcessHandler.java:58)
        at com.intellij.execution.process.CapturingProcessHandler.<init>(CapturingProcessHandler.java:45)
        at org.elixir_lang.sdk.ElixirSystemUtil.execute(ElixirSystemUtil.java:95)
        at org.elixir_lang.sdk.ElixirSystemUtil.getProcessOutput(ElixirSystemUtil.java:85)
        at org.elixir_lang.sdk.ElixirSystemUtil.transformStdoutLine(ElixirSystemUtil.java:61)
        at org.elixir_lang.sdk.ElixirSdkType.detectSdkVersion(ElixirSdkType.java:190)
        at org.elixir_lang.sdk.ElixirSdkType.getRelease(ElixirSdkType.java:230)
@KronicDeth
Copy link
Owner

  • Which version of the plug in are you using?
  • Which OS are you on?
  • How did you install Elixir?
  • What path did you put in exactly?

@inkblot
Copy link
Author

inkblot commented Nov 1, 2016

Plugin: version 4.4.0
OS: Ubuntu 14.04

Elixir: Installed version 1.3.0 using conda in a path like ~/conda/envs/environment_name which contains the Elixir SDK in lib/elixir and Erlang in lib/erlang, with symlinks to executables in bin.

SDK path: The .../lib/elixir directory which contains bin/{elixir,elixirc,iex,mix}.

Some contextual information from a basic unadulterated shell:

~/conda/envs/scratch $ echo $PS1
\w $ 
~/conda/envs/scratch $ ls -1 lib/elixir/bin
elixir
elixirc
iex
mix
~/conda/envs/scratch $ which elixir
~/conda/envs/scratch $ which erl
~/conda/envs/scratch $ file bin/elixir
/home/inkblot/conda/envs/scratch/bin/elixir: symbolic link to '../lib/elixir/bin/elixir'
~/conda/envs/scratch $ file bin/erl
/home/inkblot/conda/envs/scratch/bin/erl: symbolic link to '../lib/erlang/bin/erl'
~/conda/envs/scratch $ bin/elixir -v
bin/elixir: 126: exec: erl: not found

And after "entering" the conda environment:

~/conda/envs/scratch $ source activate scratch
discarding /home/inkblot/conda/bin from PATH
prepending /home/inkblot/conda/envs/scratch/bin to PATH
~/conda/envs/scratch $ which elixir
/home/inkblot/conda/envs/scratch/bin/elixir
~/conda/envs/scratch $ which erl
/home/inkblot/conda/envs/scratch/bin/erl
~/conda/envs/scratch $ elixir -v
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:12:12] [async-threads:10] [hipe] [kernel-poll:false]

Elixir 1.3.0
~/conda/envs/scratch $ mix --version
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:12:12] [async-threads:10] [hipe] [kernel-poll:false]

Mix 1.3.0

It seems like what's needed is a way to detect that this SDK is in a conda environment and infer what the PATH for the environment would be after activation.

@KronicDeth KronicDeth changed the title Cannot Detect SDK Version - stacktrace in IDEA log Cannot Detect SDK Version when using conda package manager Nov 29, 2016
@KronicDeth KronicDeth removed their assignment Dec 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants