From 698bf4ba2cb4593a1f0d54dd434aa4b9d779ad87 Mon Sep 17 00:00:00 2001 From: Zaid Al-Jarrah Date: Wed, 27 Jul 2022 21:25:41 -0400 Subject: [PATCH 1/3] Update option A documentation with needed changes to releases section --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 184b314b..c2d0d0ce 100644 --- a/README.md +++ b/README.md @@ -691,6 +691,22 @@ Then it's necessary to configure the Mix project to not start the `:fun_with_fla + {:fun_with_flags, "~> 1.6", runtime: false}, ``` +You'll also need to modify the `releases` section in `mix.exs` so that it loads the `fun_with_flags` application. + +```diff +def project do + [ + app: :my_phoenix_app, ++ releases: [ ++ my_phoenix_app: [ ++ applications: [ ++ fun_with_flags: :load ++ ] ++ ] + ] +end +``` + * **Option B**: Declare that the `:fun_with_flags` application is managed directly by your host application ([docs](https://hexdocs.pm/mix/1.11.3/Mix.Tasks.Compile.App.html)). ```diff From 32cfba733b35720c67609b0af2ed2e66fb424c92 Mon Sep 17 00:00:00 2001 From: Zaid Al-Jarrah Date: Tue, 2 Aug 2022 17:25:26 -0400 Subject: [PATCH 2/3] Clear-up confusing around app: false / runtime: false --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c2d0d0ce..d4a524d4 100644 --- a/README.md +++ b/README.md @@ -691,7 +691,7 @@ Then it's necessary to configure the Mix project to not start the `:fun_with_fla + {:fun_with_flags, "~> 1.6", runtime: false}, ``` -You'll also need to modify the `releases` section in `mix.exs` so that it loads the `fun_with_flags` application. +You'll also need to modify the `releases` section in `mix.exs` so that it loads the `fun_with_flags` application explicitly (since `runtime: false` / `app: false` will exclude it from the assembled release). ```diff def project do From c4349fa826f490e9d85b9027ad1e3f2fb4b8c7e8 Mon Sep 17 00:00:00 2001 From: Zaid Al-Jarrah Date: Tue, 2 Aug 2022 17:27:25 -0400 Subject: [PATCH 3/3] Note that changes are only needed if we're using releases --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d4a524d4..0e078964 100644 --- a/README.md +++ b/README.md @@ -691,7 +691,7 @@ Then it's necessary to configure the Mix project to not start the `:fun_with_fla + {:fun_with_flags, "~> 1.6", runtime: false}, ``` -You'll also need to modify the `releases` section in `mix.exs` so that it loads the `fun_with_flags` application explicitly (since `runtime: false` / `app: false` will exclude it from the assembled release). +If you use releases then you'll also need to modify the `releases` section in `mix.exs` so that it loads the `fun_with_flags` application explicitly (since `runtime: false` / `app: false` will exclude it from the assembled release). ```diff def project do