bryanjos

bryanjos

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?

First 3 of 3 Posts Switch mode

AstonJ

AstonJ

Hi Bryan, Adam Beynon (creator of Opal - the Ruby to JS transpilier) might be worth pinging? They have source maps in Opal and although he’s no longer part of the project he might be able to give you some pointers? He’s a great guy and I’m sure would be happy to chat :slight_smile:

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?

bryanjos

bryanjos OP

@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.

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 91898 914
New
AstonJ
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4616 55835 594
New
byu
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project. My initial shotgu...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement