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
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
eteeselink
Hi all, In the last days, two things happened: A blog post titled “They might never tell you it’s broken” made the rounds. It’s about ...
New
pillaiindu
I want to convert a Phoenix LiveView CRUD website to a CRUD mobile app. What do you think is the easiest way to do so?
New
Rustixir
Hi everyone, im working on find best language/framework/system for high concurrency, high performance and stable performance after wor...
New
matthias_toepp
I’d love to hear what people think about Wisp, the new Gleam web framework started by Gleam’s primary creator Louis Pilfold. Gleam, alon...
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
dogweather
I wrote this comment on r/haskell, and it’s not popular there. :wink: But I think I’m on to something… Haskell reminds me of Java, and e...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New

We're in Beta

About us Mission Statement