nixpacks
nixpacks copied to clipboard
Erlang support
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
andcargo clippy
locally to ensure that CI passes?
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.
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
should I rebase main myself or you will do it?
could you do it please?
I created a new PR from a different branch because I made a mess with this branch https://github.com/railwayapp/nixpacks/pull/421