Can't compile a Phoenix project (could not compile dependency...)

Hi all,

I have a project named zdb which uses a dependency defined as {:oha, [path: "../oha"]}

The oha dependency itself compiles correctly:

oha on dev via 💧 v1.14.3 (OTP 25)
> rm -rf _build deps && mix deps.get && mix compile
* Getting gettext (https://github.com/elixir-lang/gettext.git - 0d74f2031d63ec1a1835ec13622c7972f05b9bad)
remote: Enumerating objects: 4510, done.
remote: Counting objects: 100% (762/762), done.
remote: Compressing objects: 100% (333/333), done.
remote: Total 4510 (delta 430), reused 666 (delta 362), pack-reused 3748     
Resolving Hex dependencies...
Resolution completed in 0.185s
Unchanged:
  bcrypt_elixir 3.0.1
  blankable 1.0.0
  bunt 0.2.1
  bypass 2.1.0
  castore 0.1.22
  comeonin 5.3.3
  connection 1.1.0
  cowboy 2.9.0
  cowboy_telemetry 0.4.0
  cowlib 2.11.0
  credo 1.6.7
  dart_sass 0.5.1
  db_connection 2.4.3
  decimal 2.0.0
  dialyxir 1.2.0
  earmark 1.4.36
  earmark_parser 1.4.30
  ecto 3.9.4
  ecto_sql 3.9.2
  elixir_make 0.7.5
  erlex 0.2.6
  esbuild 0.6.1
  ex_doc 0.29.1
  expo 0.1.0
  faker 0.17.0
  file_system 0.2.10
  finch 0.13.0
  floki 0.34.2
  gen_stage 1.2.0
  git_hooks 0.7.3
  heroicons 0.5.2
  hpax 0.1.2
  jason 1.4.0
  makeup 1.1.0
  makeup_eex 0.1.1
  makeup_elixir 0.16.0
  makeup_erlang 0.1.1
  makeup_html 0.1.0
  meck 0.9.2
  mime 2.0.3
  mint 1.4.2
  mock 0.3.7
  nimble_options 0.4.0
  nimble_parsec 1.2.3
  nimble_pool 0.2.6
  phoenix 1.7.2
  phoenix_ecto 4.4.0
  phoenix_html 3.3.1
  phoenix_live_reload 1.4.1
  phoenix_live_view 0.18.16
  phoenix_pubsub 2.1.1
  phoenix_storybook 0.5.0
  phoenix_template 1.0.1
  phoenix_view 2.0.2
  plug 1.14.1
  plug_cowboy 2.6.1
  plug_crypto 1.2.5
  postgrex 0.16.5
  ranch 1.8.0
  recase 0.7.0
  recon 2.5.3
  scrivener 2.7.2
  scrivener_ecto 2.7.0
  swoosh 1.9.1
  tailwind 0.1.10
  telemetry 1.2.1
  websock 0.5.0
  websock_adapter 0.5.0
* Getting bcrypt_elixir (Hex package)
* Getting phoenix (Hex package)
* Getting phoenix_ecto (Hex package)
* Getting ecto_sql (Hex package)
* Getting postgrex (Hex package)
* Getting phoenix_html (Hex package)
* Getting phoenix_live_view (Hex package)
* Getting jason (Hex package)
* Getting floki (Hex package)
* Getting faker (Hex package)
* Getting dart_sass (Hex package)
* Getting tailwind (Hex package)
* Getting ex_doc (Hex package)
* Getting esbuild (Hex package)
* Getting credo (Hex package)
* Getting scrivener_ecto (Hex package)
* Getting mock (Hex package)
* Getting bypass (Hex package)
* Getting swoosh (Hex package)
* Getting phoenix_live_reload (Hex package)
* Getting plug_cowboy (Hex package)
* Getting gen_stage (Hex package)
* Getting dialyxir (Hex package)
* Getting finch (Hex package)
* Getting phoenix_storybook (Hex package)
* Getting recon (Hex package)
* Getting heroicons (Hex package)
* Getting git_hooks (Hex package)
* Getting blankable (Hex package)
* Getting recase (Hex package)
* Getting castore (Hex package)
* Getting earmark (Hex package)
* Getting makeup_eex (Hex package)
* Getting phoenix_view (Hex package)
* Getting phoenix_template (Hex package)
* Getting makeup (Hex package)
* Getting makeup_elixir (Hex package)
* Getting makeup_html (Hex package)
* Getting nimble_parsec (Hex package)
* Getting earmark_parser (Hex package)
* Getting mime (Hex package)
* Getting mint (Hex package)
* Getting nimble_options (Hex package)
* Getting nimble_pool (Hex package)
* Getting telemetry (Hex package)
* Getting hpax (Hex package)
* Getting erlex (Hex package)
* Getting cowboy (Hex package)
* Getting cowboy_telemetry (Hex package)
* Getting plug (Hex package)
* Getting plug_crypto (Hex package)
* Getting cowlib (Hex package)
* Getting ranch (Hex package)
* Getting file_system (Hex package)
* Getting meck (Hex package)
* Getting ecto (Hex package)
* Getting scrivener (Hex package)
* Getting decimal (Hex package)
* Getting bunt (Hex package)
* Getting makeup_erlang (Hex package)
* Getting expo (Hex package)
* Getting connection (Hex package)
* Getting db_connection (Hex package)
* Getting phoenix_pubsub (Hex package)
* Getting websock_adapter (Hex package)
* Getting websock (Hex package)
* Getting comeonin (Hex package)
* Getting elixir_make (Hex package)
You have added/upgraded packages you could sponsor, run `mix hex.sponsor` to learn more
==> earmark_parser
Compiling 1 file (.yrl)
Compiling 2 files (.xrl)
Compiling 3 files (.erl)
Compiling 46 files (.ex)
Generated earmark_parser app
==> blankable
Compiling 1 file (.ex)
Generated blankable app
==> file_system
Compiling 7 files (.ex)
Generated file_system app
==> connection
Compiling 1 file (.ex)
Generated connection app
==> gen_stage
Compiling 10 files (.ex)
Generated gen_stage app
==> decimal
Compiling 4 files (.ex)
Generated decimal app
==> mime
Compiling 1 file (.ex)
Generated mime app
==> nimble_options
Compiling 3 files (.ex)
Generated nimble_options app
==> nimble_parsec
Compiling 4 files (.ex)
Generated nimble_parsec app
==> bunt
Compiling 2 files (.ex)
Generated bunt app
===> Analyzing applications...
===> Compiling telemetry
==> jason
Compiling 10 files (.ex)
Generated jason app
==> recon
Compiling 6 files (.erl)
Generated recon app
==> comeonin
Compiling 4 files (.ex)
Generated comeonin app
==> scrivener
Compiling 4 files (.ex)
Generated scrivener app
==> db_connection
Compiling 14 files (.ex)
Generated db_connection app
==> expo
Compiling 1 file (.erl)
Compiling 17 files (.ex)
Generated expo app
==> phoenix_pubsub
Compiling 11 files (.ex)
Generated phoenix_pubsub app
==> plug_crypto
Compiling 5 files (.ex)
Generated plug_crypto app
==> hpax
Compiling 4 files (.ex)
Generated hpax app
==> gettext
Compiling 14 files (.ex)
Generated gettext app
==> recase
Compiling 15 files (.ex)
warning: Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead
  lib/recase/cases/generic.ex:7: Recase.Generic

Generated recase app
==> git_hooks
Compiling 16 files (.ex)
warning: Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead
  lib/git_hooks.ex:6: GitHooks

Generated git_hooks app
===> Analyzing applications...
===> Compiling ranch
==> credo
Compiling 242 files (.ex)
Generated credo app
==> ecto
Compiling 56 files (.ex)
Generated ecto app
==> scrivener_ecto
Compiling 2 files (.ex)
Generated scrivener_ecto app
==> plug
Compiling 1 file (.erl)
Compiling 39 files (.ex)
Generated plug app
==> phoenix_html
Compiling 9 files (.ex)
Generated phoenix_html app
==> phoenix_template
Compiling 4 files (.ex)
Generated phoenix_template app
==> phoenix_view
Compiling 1 file (.ex)
Generated phoenix_view app
==> postgrex
Compiling 64 files (.ex)
Generated postgrex app
==> makeup
Compiling 44 files (.ex)
Generated makeup app
==> makeup_elixir
Compiling 6 files (.ex)
Generated makeup_elixir app
==> makeup_erlang
Compiling 3 files (.ex)
warning: Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead
  lib/makeup/lexers/erlang_lexer.ex:250: Makeup.Lexers.ErlangLexer

Generated makeup_erlang app
==> ex_doc
Compiling 25 files (.ex)
Generated ex_doc app
==> faker
Compiling 110 files (.ex)
Generated faker app
==> erlex
Compiling 1 file (.yrl)
src/parser.yrl: Warning: conflicts: 27 shift/reduce, 0 reduce/reduce
Compiling 1 file (.xrl)
Compiling 2 files (.erl)
Compiling 1 file (.ex)
Generated erlex app
==> dialyxir
Compiling 64 files (.ex)
Generated dialyxir app
==> ecto_sql
Compiling 25 files (.ex)
Generated ecto_sql app
==> nimble_pool
Compiling 2 files (.ex)
Generated nimble_pool app
==> castore
Compiling 1 file (.ex)
Generated castore app
==> dart_sass
Compiling 3 files (.ex)
Generated dart_sass app
==> tailwind
Compiling 3 files (.ex)
Generated tailwind app
==> esbuild
Compiling 3 files (.ex)
Generated esbuild app
==> mint
Compiling 1 file (.erl)
Compiling 19 files (.ex)
Generated mint app
==> finch
Compiling 13 files (.ex)
Generated finch app
==> elixir_make
Compiling 6 files (.ex)
Generated elixir_make app
==> bcrypt_elixir
mkdir -p "/home/carloratm/w/oha/_build/dev/lib/bcrypt_elixir/priv"
cc -g -O3 -Wall -Wno-format-truncation -I"/home/carloratm/.asdf/installs/erlang/25.0.4/erts-13.0.4/include" -Ic_src -fPIC -shared  c_src/bcrypt_nif.c c_src/blowfish.c -o "/home/carloratm/w/oha/_build/dev/lib/bcrypt_elixir/priv/bcrypt_nif.so"
Compiling 3 files (.ex)
Generated bcrypt_elixir app
==> earmark
Compiling 15 files (.ex)
Generated earmark app
==> websock
Compiling 1 file (.ex)
Generated websock app
===> Analyzing applications...
===> Compiling cowlib
===> Analyzing applications...
===> Compiling cowboy
===> Analyzing applications...
===> Compiling cowboy_telemetry
==> plug_cowboy
Compiling 5 files (.ex)
Generated plug_cowboy app
==> swoosh
Compiling 42 files (.ex)
Generated swoosh app
==> websock_adapter
Compiling 2 files (.ex)
Generated websock_adapter app
==> phoenix
Compiling 71 files (.ex)
Generated phoenix app
==> phoenix_live_view
Compiling 34 files (.ex)
Generated phoenix_live_view app
==> heroicons
Compiling 3 files (.ex)
Generated heroicons app
==> phoenix_live_reload
Compiling 4 files (.ex)
Generated phoenix_live_reload app
==> makeup_html
Compiling 5 files (.ex)
warning: Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead
  lib/makeup/lexers/html_lexer.ex:135: Makeup.Lexers.HTMLLexer

Generated makeup_html app
==> makeup_eex
Compiling 6 files (.ex)
warning: this clause cannot match because a previous clause at line 91 always matches
  lib/makeup/lexers/eex_lexer.ex:91

warning: this clause cannot match because a previous clause at line 111 always matches
  lib/makeup/lexers/heex_lexer.ex:111

Generated makeup_eex app
==> phoenix_storybook
Compiling 44 files (.ex)
Generated phoenix_storybook app
==> phoenix_ecto
Compiling 7 files (.ex)
Generated phoenix_ecto app
==> oha
Compiling 90 files (.ex)

10:52:39.960 [debug] compiling storybook file: components/form/_form.index.exs

10:52:40.050 [debug] compiling storybook file: _root.index.exs
Generated oha app

But the project zdb fails to compile with:

zdb on dev via 💧 v1.14.3 (OTP 25)
> rm -rf _build deps && mix deps.get && mix compile
Resolving Hex dependencies...
Resolution completed in 0.141s
Unchanged:
  bcrypt_elixir 3.0.1
  blankable 1.0.0
  bunt 0.2.1
  castore 0.1.22
  comeonin 5.3.3
  connection 1.1.0
  cowboy 2.9.0
  cowboy_telemetry 0.4.0
  cowlib 2.11.0
  credo 1.6.7
  dart_sass 0.5.1
  db_connection 2.4.3
  decimal 2.0.0
  ecto 3.9.4
  ecto_sql 3.9.2
  elixir_make 0.7.5
  esbuild 0.6.1
  expo 0.4.0
  file_system 0.2.10
  finch 0.13.0
  floki 0.34.2
  gen_stage 1.2.0
  gettext 0.22.1
  git_hooks 0.7.3
  heroicons 0.5.2
  hpax 0.1.2
  jason 1.4.0
  mime 2.0.3
  mint 1.5.1
  nimble_options 0.4.0
  nimble_pool 0.2.6
  phoenix 1.7.1
  phoenix_ecto 4.4.0
  phoenix_html 3.3.1
  phoenix_live_dashboard 0.7.2
  phoenix_live_reload 1.4.1
  phoenix_live_view 0.18.16
  phoenix_pubsub 2.1.1
  phoenix_template 1.0.1
  plug 1.14.0
  plug_cowboy 2.6.0
  plug_crypto 1.2.3
  postgrex 0.16.5
  ranch 1.8.0
  recase 0.7.0
  recon 2.5.3
  scrivener 2.7.2
  scrivener_ecto 2.7.0
  swoosh 1.9.1
  tailwind 0.1.10
  telemetry 1.2.1
  telemetry_metrics 0.6.1
  telemetry_poller 1.0.0
  websock 0.4.3
  websock_adapter 0.4.5
* Getting phoenix (Hex package)
* Getting phoenix_ecto (Hex package)
* Getting ecto_sql (Hex package)
* Getting postgrex (Hex package)
* Getting phoenix_html (Hex package)
* Getting phoenix_live_reload (Hex package)
* Getting phoenix_live_view (Hex package)
* Getting floki (Hex package)
* Getting phoenix_live_dashboard (Hex package)
* Getting esbuild (Hex package)
* Getting tailwind (Hex package)
* Getting swoosh (Hex package)
* Getting finch (Hex package)
* Getting telemetry_metrics (Hex package)
* Getting telemetry_poller (Hex package)
* Getting gettext (Hex package)
* Getting jason (Hex package)
* Getting plug_cowboy (Hex package)
* Getting credo (Hex package)
* Getting git_hooks (Hex package)
* Getting bcrypt_elixir (Hex package)
* Getting dart_sass (Hex package)
* Getting scrivener_ecto (Hex package)
* Getting gen_stage (Hex package)
* Getting recon (Hex package)
* Getting heroicons (Hex package)
* Getting castore (Hex package)
* Getting ecto (Hex package)
* Getting scrivener (Hex package)
* Getting decimal (Hex package)
* Getting telemetry (Hex package)
* Getting comeonin (Hex package)
* Getting elixir_make (Hex package)
* Getting blankable (Hex package)
* Getting recase (Hex package)
* Getting bunt (Hex package)
* Getting file_system (Hex package)
* Getting cowboy (Hex package)
* Getting cowboy_telemetry (Hex package)
* Getting plug (Hex package)
* Getting mime (Hex package)
* Getting plug_crypto (Hex package)
* Getting cowlib (Hex package)
* Getting ranch (Hex package)
* Getting expo (Hex package)
* Getting mint (Hex package)
* Getting nimble_options (Hex package)
* Getting nimble_pool (Hex package)
* Getting hpax (Hex package)
* Getting phoenix_template (Hex package)
* Getting connection (Hex package)
* Getting db_connection (Hex package)
* Getting phoenix_pubsub (Hex package)
* Getting websock_adapter (Hex package)
* Getting websock (Hex package)
You have added/upgraded packages you could sponsor, run `mix hex.sponsor` to learn more
==> blankable
Compiling 1 file (.ex)
Generated blankable app
==> file_system
Compiling 7 files (.ex)
Generated file_system app
==> connection
Compiling 1 file (.ex)
Generated connection app
==> gen_stage
Compiling 10 files (.ex)
Generated gen_stage app
==> decimal
Compiling 4 files (.ex)
Generated decimal app
==> mime
Compiling 1 file (.ex)
Generated mime app
==> nimble_options
Compiling 3 files (.ex)
Generated nimble_options app
==> bunt
Compiling 2 files (.ex)
Generated bunt app
===> Analyzing applications...
===> Compiling telemetry
==> telemetry_metrics
Compiling 7 files (.ex)
Generated telemetry_metrics app
===> Analyzing applications...
===> Compiling telemetry_poller
==> jason
Compiling 10 files (.ex)
Generated jason app
==> recon
Compiling 6 files (.erl)
Generated recon app
==> comeonin
Compiling 4 files (.ex)
Generated comeonin app
==> scrivener
Compiling 4 files (.ex)
Generated scrivener app
==> db_connection
Compiling 14 files (.ex)
Generated db_connection app
==> expo
Compiling 2 files (.erl)
Compiling 21 files (.ex)
Generated expo app
==> phoenix_pubsub
Compiling 11 files (.ex)
Generated phoenix_pubsub app
==> plug_crypto
Compiling 5 files (.ex)
Generated plug_crypto app
==> hpax
Compiling 4 files (.ex)
Generated hpax app
==> gettext
Compiling 17 files (.ex)
Generated gettext app
==> recase
Compiling 15 files (.ex)
warning: Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead
  lib/recase/cases/generic.ex:7: Recase.Generic

Generated recase app
==> git_hooks
Compiling 16 files (.ex)
warning: Application.get_env/3 is discouraged in the module body, use Application.compile_env/3 instead
  lib/git_hooks.ex:6: GitHooks

Generated git_hooks app
===> Analyzing applications...
===> Compiling ranch
==> credo
Compiling 242 files (.ex)
Generated credo app
==> ecto
Compiling 56 files (.ex)
Generated ecto app
==> scrivener_ecto
Compiling 2 files (.ex)
Generated scrivener_ecto app
==> plug
Compiling 1 file (.erl)
Compiling 41 files (.ex)
Generated plug app
==> phoenix_html
Compiling 9 files (.ex)
Generated phoenix_html app
==> phoenix_template
Compiling 4 files (.ex)
Generated phoenix_template app
==> postgrex
Compiling 64 files (.ex)
Generated postgrex app
==> ecto_sql
Compiling 25 files (.ex)
Generated ecto_sql app
==> nimble_pool
Compiling 2 files (.ex)
Generated nimble_pool app
==> castore
Compiling 1 file (.ex)
Generated castore app
==> esbuild
Compiling 3 files (.ex)
Generated esbuild app
==> tailwind
Compiling 3 files (.ex)
Generated tailwind app
==> dart_sass
Compiling 3 files (.ex)
Generated dart_sass app
==> mint
Compiling 1 file (.erl)
Compiling 19 files (.ex)
Generated mint app
==> finch
Compiling 13 files (.ex)
Generated finch app
==> elixir_make
Compiling 6 files (.ex)
Generated elixir_make app
==> bcrypt_elixir
mkdir -p "/home/carloratm/w/zdb/_build/dev/lib/bcrypt_elixir/priv"
cc -g -O3 -Wall -Wno-format-truncation -I"/home/carloratm/.asdf/installs/erlang/25.3/erts-13.2/include" -Ic_src -fPIC -shared  c_src/bcrypt_nif.c c_src/blowfish.c -o "/home/carloratm/w/zdb/_build/dev/lib/bcrypt_elixir/priv/bcrypt_nif.so"
Compiling 3 files (.ex)
Generated bcrypt_elixir app
==> websock
Compiling 1 file (.ex)
Generated websock app
===> Analyzing applications...
===> Compiling cowlib
===> Analyzing applications...
===> Compiling cowboy
===> Analyzing applications...
===> Compiling cowboy_telemetry
==> plug_cowboy
Compiling 5 files (.ex)
Generated plug_cowboy app
==> swoosh
Compiling 42 files (.ex)
Generated swoosh app
==> websock_adapter
Compiling 2 files (.ex)
Generated websock_adapter app
==> phoenix
Compiling 71 files (.ex)
Generated phoenix app
==> phoenix_live_reload
Compiling 4 files (.ex)
Generated phoenix_live_reload app
==> phoenix_live_view
Compiling 34 files (.ex)
Generated phoenix_live_view app
==> phoenix_live_dashboard
Compiling 40 files (.ex)
Generated phoenix_live_dashboard app
==> heroicons
Compiling 3 files (.ex)
Generated heroicons app
==> phoenix_ecto
Compiling 7 files (.ex)
Generated phoenix_ecto app
==> oha
Compiling 89 files (.ex)
warning: Plural-Forms headers in the form "nplurals=<int>" (without the "plural=<rule>" part following) are invalid and support for them will be removed in future Gettext versions. Make sure to use a complete Plural-Forms header, which also specifies the pluralization rules, or remove the Plural-Forms header completely. If you do the latter, Gettext will use its built-in pluralization rules for the languages it knows about (see Gettext.Plural).
For the "de" locale, you can use the following header:

nplurals=2; plural=(n != 1);

  (gettext 0.22.1) lib/gettext/plural.ex:288: Gettext.Plural.init/1
  (gettext 0.22.1) lib/gettext/compiler.ex:571: Gettext.Compiler.compile_plural_forms/4
  (gettext 0.22.1) lib/gettext/compiler.ex:509: Gettext.Compiler.compile_po_file/5
  (gettext 0.22.1) lib/gettext/compiler.ex:450: Gettext.Compiler.compile_unified_po_file/4
  (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
  (gettext 0.22.1) lib/gettext/compiler.ex:70: Gettext.Compiler."MACRO-__before_compile__"/2

warning: Plural-Forms headers in the form "nplurals=<int>" (without the "plural=<rule>" part following) are invalid and support for them will be removed in future Gettext versions. Make sure to use a complete Plural-Forms header, which also specifies the pluralization rules, or remove the Plural-Forms header completely. If you do the latter, Gettext will use its built-in pluralization rules for the languages it knows about (see Gettext.Plural).
For the "de" locale, you can use the following header:

nplurals=2; plural=(n != 1);

  (gettext 0.22.1) lib/gettext/plural.ex:288: Gettext.Plural.init/1
  (gettext 0.22.1) lib/gettext/compiler.ex:564: Gettext.Compiler.nplurals/3
  (gettext 0.22.1) lib/gettext/compiler.ex:510: Gettext.Compiler.compile_po_file/5
  (gettext 0.22.1) lib/gettext/compiler.ex:450: Gettext.Compiler.compile_unified_po_file/4
  (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
  (gettext 0.22.1) lib/gettext/compiler.ex:70: Gettext.Compiler."MACRO-__before_compile__"/2

warning: Plural-Forms headers in the form "nplurals=<int>" (without the "plural=<rule>" part following) are invalid and support for them will be removed in future Gettext versions. Make sure to use a complete Plural-Forms header, which also specifies the pluralization rules, or remove the Plural-Forms header completely. If you do the latter, Gettext will use its built-in pluralization rules for the languages it knows about (see Gettext.Plural).
For the "en" locale, you can use the following header:

nplurals=2; plural=(n != 1);

  (gettext 0.22.1) lib/gettext/plural.ex:288: Gettext.Plural.init/1
  (gettext 0.22.1) lib/gettext/compiler.ex:571: Gettext.Compiler.compile_plural_forms/4
  (gettext 0.22.1) lib/gettext/compiler.ex:509: Gettext.Compiler.compile_po_file/5
  (gettext 0.22.1) lib/gettext/compiler.ex:450: Gettext.Compiler.compile_unified_po_file/4
  (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
  (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2

warning: Plural-Forms headers in the form "nplurals=<int>" (without the "plural=<rule>" part following) are invalid and support for them will be removed in future Gettext versions. Make sure to use a complete Plural-Forms header, which also specifies the pluralization rules, or remove the Plural-Forms header completely. If you do the latter, Gettext will use its built-in pluralization rules for the languages it knows about (see Gettext.Plural).
For the "en" locale, you can use the following header:

nplurals=2; plural=(n != 1);

  (gettext 0.22.1) lib/gettext/plural.ex:288: Gettext.Plural.init/1
  (gettext 0.22.1) lib/gettext/compiler.ex:564: Gettext.Compiler.nplurals/3
  (gettext 0.22.1) lib/gettext/compiler.ex:510: Gettext.Compiler.compile_po_file/5
  (gettext 0.22.1) lib/gettext/compiler.ex:450: Gettext.Compiler.compile_unified_po_file/4
  (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2
  (elixir 1.14.3) lib/enum.ex:1658: Enum."-map/2-lists^map/1-0-"/2


== Compilation error in file lib/oha_web/router.ex ==
** (CompileError) lib/oha_web/router.ex:6: module PhoenixStorybook.Router is not loaded and could not be found. This may be happening because the module you are trying to load directly or indirectly depends on the current module

could not compile dependency :oha, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile oha", update it with "mix deps.update oha" or clean it with "mix deps.clean oha"

In the dependency (oha) I use this version of phoenix storybook:
{:phoenix_storybook, "~> 0.5", only: [:dev]}

Any hint on how to solve?

Thank you

As of recent :gettext versions the parsing of the locale files is much more strict and the error is telling you your gettext files are malformed.

You don’t see those errors when you compile oha on its own because there is no use Gettext backend module involved at that time.

For now I would try to wind your :gettext version back to version 19 or 20 if you can. However the real resolution is to fix the gettext locale files.

Thank you!
But aren’t those warnings?

If I see correctly, the error is:

== Compilation error in file lib/oha_web/router.ex ==
** (CompileError) lib/oha_web/router.ex:6: module PhoenixStorybook.Router is not loaded and could not be found. This may be happening because the module you are trying to load directly or indirectly depends on the current module

Ahhh, indeed, sorry for the misdirection. Looks more like a circular dependency. Can you share the offending file?

defmodule OHAWeb.Router do
  @moduledoc false

  use OHAWeb, :router
  import OHAWeb.UserAuth
  import PhoenixStorybook.Router

  pipeline :browser do
    plug(:accepts, ["html"])
    plug(:fetch_session)
    plug(:fetch_flash)
    plug(:protect_from_forgery)
    plug(:put_secure_browser_headers)
    plug(:fetch_current_user)
  end

  pipeline :admin do
    plug :put_root_layout, {OHAWeb.Layouts, :root_admin}
    plug :put_layout, {OHAWeb.Layouts, :admin}
  end

  pipeline :admin_fullscreen do
    plug :put_root_layout, {OHAWeb.Layouts, :root_admin}
    plug :put_layout, {OHAWeb.Layouts, :admin_fullscreen}
  end

  scope "/" do
    storybook_assets()
  end

  scope "/", OHAWeb do
    pipe_through([:browser])

    get("/", DemoController, :home)
    live_storybook("/storybook", backend_module: OhaWeb.Storybook)
  end
end

It seems that the storybook dependency is in your zdb’s mix file, where it is oha which is actually using storybook.

What happens if you declare (or move) the storybook dependency into oha’s mix file?

The storybook dependency is defined into oha mix.exs.
It is indeed absent from zdb mix.exs.

Could it be that story_book is only available in dev, have you tried removing the only: [:dev] portion in your oha ‘s mix?

Thank you @krstfk

I am compiling the zdb project in dev, so shouldn’t that pick up the phoenix_storybook dep correctly?

I wouldn’t do that because I really need storybook only on dev.

you could pass the env: option to your oha dep see:
https://hexdocs.pm/mix/1.14.3/Mix.Tasks.Deps.html#module-dependency-definition-options

Edit correct mix version link

Interesting, I tried forcing the prod env on the dependency (shouldn’t that be the default?), but got the same error.
I have to mention it is a path dep.

{:oha, [path: "../oha", env: :prod]}

Should be {:oha, [path: "../oha", env: :dev]} ( :prod is the default).
Note that this would only be a quick fix, and you should probably reorganise your code and deps.

3 Likes

Ah yes, of course.
That works, thank you.

1 Like