-
Notifications
You must be signed in to change notification settings - Fork 136
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
erlang_ls --version always returning 0.0.0 #1369
Comments
Hi @robsonpeixoto ! I cannot reproduce this, not even on a fresh clone. What OTP/rebar3 versions are you using? |
Can you also describe the steps you are using to compile Erlang LS? |
This bug only happen when compiled from the tarball https://github.com/erlang-ls/erlang_ls/archive/refs/tags/0.41.2.tar.gz.
|
I believe this has something to do with running the When I try to build using my forked repo I can reproduce the same problem with the version output: zach@zach-VirtualBox:~/Documents$ git clone https://github.com/zach-writes-code/erlang_ls && cd erlang_ls
zach@zach-VirtualBox:~/Documents/erlang_ls$ sudo make install
Building escript...
===> Fetching erlfmt v1.1.0
...
...
...
===> Building escript for els_dap...
Installing escript...
zach@zach-VirtualBox:~/Documents/erlang_ls$ erlang_ls -v
Version: 0.0.0+build.1898.ref55a3854
zach@zach-VirtualBox:~/Documents/erlang_ls$ git tag
zach@zach-VirtualBox:~/Documents/erlang_ls$ However when I fetch the upstream repo it pulls all the tags in and builds with the correct version output: zach@zach-VirtualBox:~/Documents/erlang_ls$ git remote add upstream https://github.com/erlang-ls/erlang_ls
zach@zach-VirtualBox:~/Documents/erlang_ls$ git fetch upstream
remote: Enumerating objects: 1261, done.
...
...
* [new tag] 0.40.0 -> 0.40.0
* [new tag] 0.41.0 -> 0.41.0
* [new tag] 0.41.1 -> 0.41.1
* [new tag] 0.41.2 -> 0.41.2
...
...
zach@zach-VirtualBox:~/Documents/erlang_ls$ sudo make install
Building escript...
===> Verifying dependencies...
...
...
===> Building escript for els_dap...
Installing escript...
zach@zach-VirtualBox:~/Documents/erlang_ls$ erlang_ls -v
Version: 0.41.2+build.1898.ref55a3854 I've poked around the code to try to understand why this is, but have not been able to pin anything down. |
@zachlankton You were on the right path. The version is retrieved from the git repo as set here https://github.com/erlang-ls/erlang_ls/blob/0.50.0/src/erlang_ls.app.src#L3 on the
@robertoaloi A possible solution is to use a |
Describe the bug
To Reproduce
Expected behavior
Actual behavior
Context
erlang_ls
version (tag/sha): 0.41.2I'm submitting a PR to use homebrew to install erlang_ls(https://github.com/Homebrew/homebrew-core/pull/108766/files) and after install I tried the
--version
flag to figure-out if the command was installed correctly.The text was updated successfully, but these errors were encountered: