bryanjos

bryanjos

Elixirscript: dependencies and source maps

Hi,

Two of the more challenging issues left for elixirscript are dependency resolution and source maps and I am looking for any advice, opinions, idea, or help that could lead to resolving them.

For dependencies, I’ve been playing around with the idea of using some of the functionality in mix to find dependencies in the deps folder for use. I saw the Mix.Dep module and it looked like it could be useful. Would that be safe to use? Does it make sense to explicitly state elixirscript dependencies? Does it make more sense to crawl the ast and find exactly what modules and dependencies are in use? A goal is hopefully to only end up with output that only includes what is used.

Source maps I think are more complicated. As far as I can tell, Elixir doesn’t output column information with the ast. I’ve seen the discussions and issues on why that is. On top of that, there is creating the algorithm for the source map encoding and then mapping the elixir code. I’m still trying to wrap my head around source maps. It may not be something that is currently doable without column information (I’m not sure), but I would like to do whatever is possible to get steps further towards the goal. I know that Luvviescript took the approach of calculating the column information for Erlang. I was hoping to avoid that, but maybe something like that is the best option?

Most Liked

bryanjos

bryanjos

@AstonJ thanks I will see if I can have a chat with him.

@OvermindDL1 yes, I think having elixirscript dependencies defined in the mix.exs file, but separate is a good idea. It might make knowing what to compile easier. The one issue I see there is with possibly downloading dependencies. Maybe there is a hybrid approach? One idea could be to still define them in the same place, but set an option to say they are only used in elixirscript? Maybe something as simple as setting them to be available in a different environment the same way we currently do with dev, test, prod, etc.

On generators/processes, I do think it is possible and I was mainly able to achieve it. I think I underestimated how much things from OTP would also be needed and that’s when I backtracked. If I had a bit more help it might be something to tackle, but it’s not something I would want to tackle myself.

Somewhat related, I’ve been thinking about simplifying some of the javascript specific things in elixirscript to make sharing code between elixir and elixirscript easier.

OvermindDL1

OvermindDL1

Makes sense to use to me, although I might go a different route by having Elixirscript dependencies be set elsewhere (can still be done in the mix.exs file, via, say, your compiler and plugins for mix).

As for source maps… no clue… :frowning:

I’ve definitely been keeping an eye on Elixirscript. I’m curious how javascript generators have been insufficient for emulating processes though?

Where Next?

Popular in Discussions Top

ben-pr-p
In general I’ve been sticking to this community style guide GitHub - christopheradams/elixir_style_guide: A community driven style guide ...
New
joeerl
I’m playing with Elixir - It’s fun. I think @rvirding does give Elixir courses these days. Re: files and database - when I given Erlang ...
New
acrolink
How does the two languages compare when it comes to server side application development? Any experiences or ideas? Thank you.
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
chuck
Let me start by stating an assumption: Phoenix is a great approach to building REST APIs. There are many reasons for this, but I will ass...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New
shishini
I think this twitter post and youtube video didn’t get as much attention as I hoped I am still new to Elixir, so can’t really judge ...
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36654 110
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54006 488
New
saif
Hello everyone, Long time lurker first time poster here. I’ve recently begun working on Elixir full-time again! :raised_hands: It’s been...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 42533 114
New

We're in Beta

About us Mission Statement