How would a module know what __APP__ is? What would the rules be? Cheers, Louis
On Wed, 30 Nov 2016, 17:11 Allen Madsen, <allen.c.mad...@gmail.com> wrote: > What happens when you have your app and a dependency that both use __APP__? > > Allen Madsen > > > On Wed, Nov 30, 2016 at 11:40 AM, Dave Thomas <d...@pragdave.me> wrote: > > I just tried to change the application name in a trivial Phoenix project. > > The name of the project is embedded into the source code 48 times. I have > > one controller, one view, and a channel. > > > > My suggestion: assume anything created using mix will be build using mix. > > For these builds, add the definition __APP__, set to the application name > > (in module-name form) from the mix.exs file. > > > > Then generate all the underlying files using > > > > defmodule __APP__.EndPoint do > > ... > > > > This could apply to both mix new and mix phoenix.new, as well as anything > > else that comes along. > > > > Dave > > > > -- > > You received this message because you are subscribed to the Google Groups > > "elixir-lang-core" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to elixir-lang-core+unsubscr...@googlegroups.com. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/elixir-lang-core/fe291b67-82f9-411e-ae3a-a1821867ebc6%40googlegroups.com > . > > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to elixir-lang-core+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/CAK-y3CvsXJTp4sfcjC4iA61NF-509Keato7_bDacSTJ9_3_MJg%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAM-pwt5n5eGKfNbfQyCoTX_0Cq8Fu%3DyXSA98EAMOtey_tchS%2Bg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.