<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Long Le</title>
    <description>The latest articles on DEV Community by Long Le (@dragonlong206).</description>
    <link>https://dev.to/dragonlong206</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F690613%2F5b81e1dc-3974-4ec0-a8d8-13dc25c2d0fc.jpeg</url>
      <title>DEV Community: Long Le</title>
      <link>https://dev.to/dragonlong206</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dragonlong206"/>
    <language>en</language>
    <item>
      <title>Install old Erlang and Elixir version with asdf</title>
      <dc:creator>Long Le</dc:creator>
      <pubDate>Mon, 15 Nov 2021 03:34:44 +0000</pubDate>
      <link>https://dev.to/onpointvn/install-old-erlang-and-elixir-version-with-asdf-1jof</link>
      <guid>https://dev.to/onpointvn/install-old-erlang-and-elixir-version-with-asdf-1jof</guid>
      <description>&lt;p&gt;Last weekend, I installed old Erlang and Elixir version on my Mac and faced some issues that took me some time to research and resolve. I think I should share my experience here to help you saving your time if you encounter the same issues as me.&lt;br&gt;
Firstly, what is asdf and how to install multiple versions of Erlang and Elixir using asdf. I read some posts that are really helpful but this one seems to be the best: &lt;a href="https://thinkingelixir.com/install-elixir-using-asdf/" rel="noopener noreferrer"&gt;https://thinkingelixir.com/install-elixir-using-asdf/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In summary, you need to do the following steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install asdf (using homebrew, zsh plugin...).&lt;/li&gt;
&lt;li&gt;Add erlang plugin to asdf. Asdf uses plugins to manage libraries.&lt;/li&gt;
&lt;li&gt;Install the desired erlang version. Asdf will checkout erlang code and build this library on your machine. Problems come from here, I will explain on the issues section below.&lt;/li&gt;
&lt;li&gt;Add elixir plugin to asdf.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install the desired elixir version.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Notice that each Elixir release has multiple versions compiled with different major versions of Erlang/OTP. To maximize compatibility between Elixir and the Erlang runtime, choose a &lt;code&gt;1-otp-XY&lt;/code&gt; version that matches the major version of the runtime you installed in the previous step. For example:&lt;br&gt;
&lt;/p&gt;


&lt;/blockquote&gt;

&lt;pre class="highlight plaintext"&gt;&lt;code&gt;asdf install elixir 1.11.2-otp-23
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Set global (used for your whole computer) and local (used for specific directory) version.&lt;/p&gt;&lt;/li&gt;

&lt;/ol&gt;

&lt;h2&gt;
  
  
  Issues
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;When building erlang on your machine, you may encounter errors showing that cannot run some &lt;code&gt;make&lt;/code&gt; commands. These issues are caused by the newest &lt;code&gt;autoconf&lt;/code&gt; library version, a dependency of asdf. To solve this, please remove &lt;code&gt;autoconf&lt;/code&gt; and then install it manually as the instruction in this link &lt;a href="https://github.com/asdf-vm/asdf-erlang/issues/195#issuecomment-815999279" rel="noopener noreferrer"&gt;https://github.com/asdf-vm/asdf-erlang/issues/195#issuecomment-815999279&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Cannot compile project after downgrading Elixir and Erlang. With this issue, please do some cleanups and then recompile the project:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rm -rf _build
mix deps.clean --all
mix clean
mix deps.get
mix compile
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ElixirLS does not working. In my case, the newest ElixirLS version is 0.8.1, is not compatible with the installed Elixir version 1.10.3. So what I did is downgrade the ElixirLS to version 0.7.0:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvr12h3b8a3xwg4v22ehc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvr12h3b8a3xwg4v22ehc.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Good luck! &lt;/p&gt;

</description>
      <category>asdf</category>
      <category>elixir</category>
      <category>erlang</category>
    </item>
    <item>
      <title>Elixir intellisense stop working</title>
      <dc:creator>Long Le</dc:creator>
      <pubDate>Sat, 11 Sep 2021 00:41:07 +0000</pubDate>
      <link>https://dev.to/onpointvn/elixirls-intellisense-stop-working-29jo</link>
      <guid>https://dev.to/onpointvn/elixirls-intellisense-stop-working-29jo</guid>
      <description>&lt;p&gt;Recently, VSCode intellisense feature for elixir has stopped working on my Mac. Code autocomplete, go to definition, function description... are all failed. My colleagues encounter the same problem.&lt;br&gt;
After researching, I found the root cause is ElixirLS has crashed from launching.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F958fwk12erc3mg9pd2ue.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F958fwk12erc3mg9pd2ue.png" alt="ElixirLS crash"&gt;&lt;/a&gt;&lt;br&gt;
I tried to disable ElixirLS, close the editor, open the editor again and enable ElixirLS but no luck. I also tried to reinstall ElixirLS but nothing changes.&lt;br&gt;
So I went to ElixirLS Github homepage, move to &lt;a href="https://github.com/elixir-lsp/vscode-elixir-ls#troubleshooting" rel="noopener noreferrer"&gt;Troubleshooting region&lt;/a&gt; and I found the solution:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Remove .elixir_ls folder in project folder:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; .elixir_ls/ 
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Close VSCode.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Open project in VSCode again, wait for ElixirLS run.&lt;br&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw8hveq7k7q2kbf3qhyj1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw8hveq7k7q2kbf3qhyj1.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;And voila! &lt;/p&gt;&lt;/li&gt;

&lt;/ol&gt;

&lt;h2&gt;
  
  
  Updated 2021-11-14:
&lt;/h2&gt;

&lt;p&gt;If the above method does not work, you can try the final solution below:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Get your elixir path&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;which elixir
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Edit the &lt;code&gt;launch.sh&lt;/code&gt; file of elixir-ls extension (the file path can be seen in the log above), add the export PATH="elixir/path/here" before &lt;code&gt;exec elixir&lt;/code&gt; command.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgu481tbcwnwtxujrup3z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgu481tbcwnwtxujrup3z.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This way has an inconvenience that is every time you update the extension, you need to modify the &lt;code&gt;launch.sh&lt;/code&gt; file again.&lt;/p&gt;

</description>
      <category>elixir</category>
      <category>elixirls</category>
      <category>intellisense</category>
      <category>vscode</category>
    </item>
  </channel>
</rss>
