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

Writing Elixir modules #625

Closed
dapriett opened this issue Jun 29, 2015 · 8 comments
Closed

Writing Elixir modules #625

dapriett opened this issue Jun 29, 2015 · 8 comments

Comments

@dapriett
Copy link

Hello,

I'm new to both writing modules for Ejabberd as well as Elixir (and erlang). I'm trying to follow the blog post here: https://blog.process-one.net/elixir-sips-ejabberd-with-elixir-part-1/

I'm using the Mac OSX installer of ejabberd (https://www.process-one.net/en/ejabberd/downloads/) - how would I add a custom Elixir module into it? Do I just create a .ex Elixir module and dump it into the lib directory? Is there some sort of compilation I have to do first? Do you have a sample Elixir module project out there?

Thanks, and sorry for the newbie questions.

@mremond
Copy link
Member

mremond commented Jun 29, 2015

Well, if you want to develop on Elixir with ejabberd, basically, the blog post shows that you need a development environment, source code, etc.
We never tried yet developing Elixir module from the binary installer. It is intended to be a small, ready to use package for users, not for developers. Probably you will be missing development tool.

My recommendation is thus to install Erlang, Elixir on your machine and to build ejabberd from source. At the moment, that's the best approach.

I will keep the ticket open to see if we can test the build chain for Elixir and see if we can make it work.

@mremond mremond self-assigned this Jun 29, 2015
@dapriett
Copy link
Author

Ok thanks.

I tried copying my elixir project to my ~/.ejabberd-modules/sources. I had to create a .spec file to make it see it, and I was able to do module_install but it looks like the install creates an empty ebin directory. So guessing the build chain doesn't support it yet.

@mremond
Copy link
Member

mremond commented Jun 29, 2015

Yes the module installer does not yet support Elixir module.

@nrako
Copy link

nrako commented Aug 24, 2015

I'd love to see support of Elixir module by the module installer. Or else some guide to compile a Elixir module for ejabberd independently elixirc -o ebin -I .... without having to rely on the main ejabberd build would also help people like me who are new to this env.

@KadekM
Copy link

KadekM commented Aug 27, 2015

+1 on support from module installer

@cromain cromain assigned cromain and unassigned mremond Sep 3, 2015
@sebyx07
Copy link

sebyx07 commented Oct 11, 2015

also a better documentation on behaviours and other basic stuff you can do from erlang/elixir would be great

@mremond mremond assigned gabrielgatu and unassigned cromain Jun 29, 2016
cromain added a commit that referenced this issue Jul 28, 2016
@cromain cromain added this to the ejabberd 16.08 milestone Jul 28, 2016
@cromain
Copy link
Contributor

cromain commented Jul 28, 2016

Feature added by #1193 thanks to Gabriel

@cromain cromain closed this as completed Jul 28, 2016
@lock
Copy link

lock bot commented Jun 11, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot unassigned gabrielgatu Jun 11, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants