aws-samples / aws-lambda-elixir-runtime

Example implementation of a custom runtime for running Elixir on AWS Lambda.
MIT No Attribution
127 stars 32 forks source link

Umbrella project #2

Open madshargreave opened 5 years ago

madshargreave commented 5 years ago

Does this work with umbrella projects?

BradleyLyman commented 5 years ago

I haven't personally used it as an umbrella project. It's a reasonable thought though. Especially given that this repo includes the examples as separate Mix projects (e.g. this repo is essentially an informal umbrella project consisting of the runtime and examples).

That said, is there something specific about an umbrella project that would be useful to support? So far I've been able to leverage the runtime by declaring a normal Hex dependency in my mix file.

madshargreave commented 5 years ago

One thing I noticed with regards to umbrella projects was that we use the name of the root mix project to create the folder structure in the bootstrap script.

To my knowledge the root mix project usually don't have the :app key, so this will always be null. If you then just set it to something, then you won't be able to deploy multiple different releases from the same project. The solution would be to use the name of the release instead

BradleyLyman commented 5 years ago

Oh! I see, you're referring to this bit: https://github.com/aws-samples/aws-lambda-elixir-runtime/blob/b5a7e664dbad7bc6832d5ea7989de6df813435bc/elixir_runtime/lib/mix/tasks/bootstrap.ex#L16-L19

That's an excellent point and it shouldn't be terribly hard to use the release instead. Feel free to make a Pull Request if you've got something in mind :) Otherwise I'll make the change, test it, and see what it looks like sometime in the next few days.

madshargreave commented 5 years ago

Yes exactly, I won't have time this this, but if you haven't looked at it before the following week I'll submit a PR 👍