-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Creating Umbrella Web App With phx.new.web
Results in App That Cannot Be Compiled
#5690
Comments
I'm happy to open a PR for the proposed solution. Just want to see if there is a more apt name than |
I'm a dummy. That's what the |
Ok actually I'm not as dumb as I thought (what a sentence). There are some subtle differences that should be addressed. When passing the |
Please share the details of the collisions you hit. Thanks! |
Ah yeah sorry I've been working on the PR to fix it. The collisions were in the generated app name. While the parent folder reflects the name passed as the argument ( The most clear example of this was in the defmodule Foo.MixProject do
As well as |
PR #5691 fixes things in the context of the test suite as well as local manual testing. |
Environment
1.16.0
1.7.10
Actual Behavior
mix phx.new foo --umbrella
cd foo_umbrella/apps
mix phx.new.web bar
cd ..
mix
There are a couple errors that occur:
config/config.exs
:Bar.Repo
should not exist in the context of specifically a web application. It is inconsistent with the generatedfoo_web
configuration:bar/test/support/conn_case.exs
file:foo_web
config:Expected Behavior
The app should be able to be compiled when a new web app is generated in the context of an umbrella app.
Proposed Solution
Adding something like a
--depends-on
flag to thephx.new.web
generator so that the backing app can be specified in the generator. The additional context of the flag would also enable adding{:foo, in_umbrella: true},
automatically todeps
inside ofbar/mix.exs
Example:
Resulting in:
The text was updated successfully, but these errors were encountered: