shahryarjb
How to get vsn from .app file
Hi, I want to get vsn from build folder after compiling, so I do not add a dep and get from Application module.
For example: (_build/dev/lib/castore/ebin/castore.app)
{application,castore,
[{applications,[kernel,stdlib,elixir,logger]},
{description,"Up-to-date CA certificate store."},
{modules,['Elixir.CAStore']},
{registered,[]},
{vsn,"0.1.17"}]}.
What is the best way to get {vsn,"0.1.17"} from top file as a Tuple?
Thank you in advance
Marked As Solved
josevalim
Creator of Elixir
If you can load it, then Application.load(:castore) and then Application.spec(:castore, :vsn). Otherwise you will have to parse it, which is what we do here: elixir/compile.all.ex at main · elixir-lang/elixir · GitHub
4
Also Liked
shahryarjb
I want to thank you and also mention this point; When the creator of elixir answers a question, the feeling of happiness that follows is indescribable.
Thank you for all your efforts.
4
Popular in Questions
In Ruby, I can go:
User.find_by(email: "foobar@email.com").update(email: "hello@email.com")
How can I do something similar in Elixir? ...
New
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
I would like to know what is the best IDE for elixir development?
New
Hello,
I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these
buyer = %{
id: ...
New
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
What is most correct way to open, read and parse JSON file with poison?
For example if we have example.json file in root of some projec...
New
The Elixir Typespec docs show the following syntax for keyword lists in typespecs:
# ...
| [key: type] # keyword lis...
New
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors:
[WARN] - (starship::utils): Executing command ...
New
Other popular topics
Update:
How to use the Blogs & Podcasts section
You can post links to your blog posts or podcasts either in one of the Official Blog...
New
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
I would like to know what is the best IDE for elixir development?
New
Hi,
I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
Hey,
Just curious what are the main benefits of Elixir compared to Clojure?
When is Elixir more useful than Clojure and vice versa?
Th...
New
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
Hi,
I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including.
What is Phoenix LiveV...
New
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New








