ignatov / intellij-erlang

Erlang IDE
https://www.jetbrains.com/help/idea/2018.2/getting-started-with-erlang.html
Other
735 stars 120 forks source link

fix can't resolve rebar version problem; fix sdk string mismatching #926

Open yidayoung opened 4 years ago

yidayoung commented 4 years ago

fix #903 like issue said can't resolve rebar version problem on windows, seems just should use escript.getStdOut() not rebar.getStdOut()

https://github.com/ignatov/intellij-erlang/blob/8eb5f46096284707776a0e4b4594e86a57ee2df5/src/org/intellij/erlang/rebar/settings/RebarConfigurationForm.java#L97-L98


after this comit 0dfb40ea7a36b0a8e6987993a2f5ccc6d99a78c3[simplify visible erlang sdk name] should also change patten https://github.com/ignatov/intellij-erlang/blob/0dfb40ea7a36b0a8e6987993a2f5ccc6d99a78c3/src/org/intellij/erlang/sdk/ErlangSdkRelease.java#L34 https://github.com/ignatov/intellij-erlang/blob/0dfb40ea7a36b0a8e6987993a2f5ccc6d99a78c3/src/org/intellij/erlang/sdk/ErlangSdkRelease.java#L63-L64

or ErlangSdkType.detectSdkVersion will always call erl, but not all time can use OSProcessHandler, it will make error ERROR - ution.process.OSProcessHandler - Synchronous execution on EDT

kvakvs commented 2 years ago

OTP version can be read from SdkRoot/releases/xx/OTP_VERSION and ERTS version can be found from SdkRoot/erts-xxx directory name. I will soon create a merge request for that and also will look at this code here