nixpacks icon indicating copy to clipboard operation
nixpacks copied to clipboard

Erlang support

Open marianoguerra opened this issue 2 years ago • 1 comments

What does this PR address?

Adds initial support for Erlang

If there's a way to test deploying to railwayapp before merging here I can do that but I don't know how.

Note: for the start task I need to know the name of the release, which is in the rebar.config file which has an Erlang specific format called "erlang terms" (a subset of the Erlang syntax), the simplest way that would handle it correctly other than regexes is to add an erlang lexer library and extract the release name from the lexer stream, let me know if I should use a Regex instead (which may not work in some cases).

Another solution for this would be to run an Erlang one liner to parse the file and get the release name from the data, but that would require to have Erlang available at build time (with something like nix-shell) but I think it' not possible yet.

This will also be required for Elixir (which I plan to add) but even worse because mix.exs in Elixir is Elixir code that has to run to get the release name, so parsing may not be enough.

Before submitting:

  • [x] Make sure to follow GitHub's guide on creating PR.
  • [x] Did you read through contribution guidelines?
  • [x] Did your changes require updates to the documentation? Have you updated those accordingly?
  • [x] Did you write tests to cover your changes? Did it pass locally when running cargo test?
  • [x] Have you run cargo fmt, cargo check and cargo clippy locally to ensure that CI passes?

marianoguerra avatar Jul 31 '22 12:07 marianoguerra

I rebased my changes on main some days ago and I see some changes in other files appear in my PR, not sure what to do about them.

marianoguerra avatar Jul 31 '22 12:07 marianoguerra

This pull request is stale because it has been open 10 days with no activity. Remove stale label or comment or this will be closed in 5 days

github-actions[bot] avatar Aug 16 '22 17:08 github-actions[bot]

should I rebase main myself or you will do it?

marianoguerra avatar Aug 17 '22 12:08 marianoguerra

could you do it please?

Milo123459 avatar Aug 17 '22 12:08 Milo123459

I created a new PR from a different branch because I made a mess with this branch https://github.com/railwayapp/nixpacks/pull/421

marianoguerra avatar Aug 19 '22 08:08 marianoguerra