Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include erlang ffi modules on .app file for releases to work with gleam apps #3710

Open
LostKobrakai opened this issue Oct 18, 2024 · 4 comments
Labels
good first issue Good for newcomers help wanted Contributions encouraged priority:high

Comments

@LostKobrakai
Copy link

gleam new repro
cd repro
gleam export erlang-shipment 
cat build/erlang-shipment/gleam_stdlib/ebin/gleam_stdlib.app

The modules list is missing gleam_stdlib for being an erlang ffi module.

Same problem applies to hex tarballs *.app.src files.

@LostKobrakai LostKobrakai added the bug Something isn't working label Oct 18, 2024
@lpil
Copy link
Member

lpil commented Oct 18, 2024

Thank you.

@lpil lpil added help wanted Contributions encouraged good first issue Good for newcomers priority:medium and removed bug Something isn't working labels Oct 18, 2024
@lawik
Copy link

lawik commented Oct 18, 2024

Smells like Nerves support.

@lpil
Copy link
Member

lpil commented Oct 18, 2024

High priority it is

@LostKobrakai
Copy link
Author

Leaving some notes from me digging through the codebase:

It seems like compiler-cli/templates/gleam@@compile.erl would need to be updated to not just return ok/error, but also the module names of successfully compiled modules. BeamCompiler.compile would then return that to PackageCompiler.perform_erlang_codegen, which after some reordering could then write an app file containing both gleam sourced modules as well as erlang/elixir ffi sourced modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Contributions encouraged priority:high
Projects
None yet
Development

No branches or pull requests

3 participants