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

Raise on mix phx.new server as server is a clashing overlay #5809

Open
chrismccord opened this issue May 15, 2024 · 1 comment · May be fixed by #6011
Open

Raise on mix phx.new server as server is a clashing overlay #5809

chrismccord opened this issue May 15, 2024 · 1 comment · May be fixed by #6011

Comments

@chrismccord
Copy link
Member

No description provided.

@almirsarajcic
Copy link
Contributor

almirsarajcic commented Dec 10, 2024

Hey @chrismccord, which version was this on?
I don't think it's an issue anymore.
I've tried it on 1.7.17 with Elixir 1.17.3 and Erlang 27.1.2 (like that matters :D) and I was able to run mix setup and then mix phx.server successfully.

UPDATE: My bad, now I realize it's related to Elixir releases.
Running mix release overwrites the app bin with the server bin coming from Phoenix.


Slightly related:

I do have a problem with the app name, though, when I name the application table.
Take a look at this:

$ mix phx.new table
* creating table/lib/table/application.ex
* creating table/lib/table.ex
* creating table/lib/table_web/controllers/error_json.ex
* creating table/lib/table_web/endpoint.ex
* creating table/lib/table_web/router.ex
* creating table/lib/table_web/telemetry.ex
* creating table/lib/table_web.ex
* creating table/mix.exs
* creating table/README.md
* creating table/.formatter.exs
* creating table/.gitignore
* creating table/test/support/conn_case.ex
* creating table/test/test_helper.exs
* creating table/test/table_web/controllers/error_json_test.exs
* creating table/lib/table/repo.ex
* creating table/priv/repo/migrations/.formatter.exs
* creating table/priv/repo/seeds.exs
* creating table/test/support/data_case.ex
* creating table/lib/table_web/controllers/error_html.ex
* creating table/test/table_web/controllers/error_html_test.exs
* creating table/lib/table_web/components/core_components.ex
* creating table/lib/table_web/controllers/page_controller.ex
* creating table/lib/table_web/controllers/page_html.ex
* creating table/lib/table_web/controllers/page_html/home.html.heex
* creating table/test/table_web/controllers/page_controller_test.exs
* creating table/lib/table_web/components/layouts/root.html.heex
* creating table/lib/table_web/components/layouts/app.html.heex
* creating table/lib/table_web/components/layouts.ex
* creating table/priv/static/images/logo.svg
* creating table/lib/table/mailer.ex
* creating table/lib/table_web/gettext.ex
* creating table/priv/gettext/en/LC_MESSAGES/errors.po
* creating table/priv/gettext/errors.pot
* creating table/priv/static/robots.txt
* creating table/priv/static/favicon.ico
* creating table/assets/js/app.js
* creating table/assets/vendor/topbar.js
* creating table/assets/css/app.css
* creating table/assets/tailwind.config.js

Fetch and install dependencies? [Yn] Y
* running mix deps.get
* running mix assets.setup
* running mix deps.compile

We are almost there! The following steps are missing:

    $ cd table

Then configure your database in config/dev.exs and run:

    $ mix ecto.create

Start your Phoenix app with:

    $ mix phx.server

You can also run your app inside IEx (Interactive Elixir) as:

    $ iex -S mix phx.server

$ cd table
$ mix setup
Resolving Hex dependencies...
Resolution completed in 0.143s
Unchanged:
  bandit 1.6.1
  castore 1.0.10
  db_connection 2.7.0
  decimal 2.2.0
  dns_cluster 0.1.3
  ecto 3.12.5
  ecto_sql 3.12.1
  esbuild 0.8.2
  expo 1.1.0
  file_system 1.0.1
  finch 0.19.0
  floki 0.37.0
  gettext 0.26.2
  hpax 1.0.1
  jason 1.4.4
  mime 2.0.6
  mint 1.6.2
  nimble_options 1.1.1
  nimble_pool 1.1.0
  phoenix 1.7.17
  phoenix_ecto 4.6.3
  phoenix_html 4.1.1
  phoenix_live_dashboard 0.8.5
  phoenix_live_reload 1.5.3
  phoenix_live_view 1.0.0
  phoenix_pubsub 2.1.3
  phoenix_template 1.0.4
  plug 1.16.1
  plug_crypto 2.1.0
  postgrex 0.19.3
  swoosh 1.17.3
  tailwind 0.2.4
  telemetry 1.3.0
  telemetry_metrics 1.0.0
  telemetry_poller 1.1.0
  thousand_island 1.3.7
  websock 0.5.3
  websock_adapter 0.5.8
All dependencies are up to date
Compiling 15 files (.ex)
warning: defining a Gettext backend by calling

    use Gettext, otp_app: ...

is deprecated. To define a backend, call:

    use Gettext.Backend, otp_app: :my_app

Then, instead of importing your backend, call this in your module:

    use Gettext, backend: MyApp.Gettext

  lib/table_web/gettext.ex:23: TableWeb.Gettext (module)

Generated table app

It's stuck at this point. I've had time some time ago so I can't remember exactly what the issue is. All I know is it's not an issue in Phoenix, but Ecto. Still, maybe the docs should include a list of magic words that can't be used as an app name.

@almirsarajcic almirsarajcic linked a pull request Dec 11, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants