Release compat#26
Conversation
This PR allows for running `mix release` as the LiveReload code is now guarded against if it is explicitly opted out of In addition, the `plug` option from `start/1` was moved into `start_link/1` so the Router can be overridden when using `start_link/1` directly
627ca3f to
ecdd33a
Compare
| {PhoenixPlayground, plug: plug, live_reload: false} | ||
| ] | ||
|
|
||
| opts = [strategy: :one_for_one, name: __MODULE__] |
There was a problem hiding this comment.
__MODULE__ expands to nil in scripts:
| opts = [strategy: :one_for_one, name: __MODULE__] | |
| opts = [strategy: :one_for_one] |
| ] | ||
|
|
||
| opts = [strategy: :one_for_one, name: __MODULE__] | ||
| Supervisor.start_link(children, opts) |
There was a problem hiding this comment.
| Supervisor.start_link(children, opts) | |
| {:ok, _} = Supervisor.start_link(children, opts) |
|
|
||
| opts = [strategy: :one_for_one, name: __MODULE__] | ||
| Supervisor.start_link(children, opts) | ||
|
|
There was a problem hiding this comment.
| System.no_halt(true) |
| plug :run_live_reload | ||
|
|
||
| defp run_live_reload(conn, _options) do | ||
| if Application.get_env(:phoenix_playground, :live_reload) do |
There was a problem hiding this comment.
we already have a check if live_reload is enabled on line 22, I'm curious if you intentionally left this check here to allow changing the value at runtime somehow?
There was a problem hiding this comment.
I'll go through this, it was early on and I may have spiked this incorrectly.
WDYT about adding an |
|
@wojtekmach that makes sense, I can add those in this week. |
This PR allows for running
mix releaseas the LiveReload code is now guarded against if it is explicitly opted out ofIn addition, the
plugoption fromstart/1was moved intostart_link/1so the Router can be overridden when usingstart_link/1directlyAdded an example to run for using
start_link/1in a Supervisor. This example stack traces prior to this PRAlso updated to latest
phoenix_live_view