-
Notifications
You must be signed in to change notification settings - Fork 12
mix igniter.install phoenix_sync --sync-mode embedded fails on first run but succeeds on second run #126
Copy link
Copy link
Open
Description
Environment
- Elixir:
1.20.0-rc.4-otp-28,1.19.5-otp-28,1.18.4-otp-28 - Phoenix:
1.7.x - Phoenix.Sync:
0.6.1 - igniter:
0.7.7
What I did
- Created a new project:
mix phx.new hello- Added
ignitertomix.exs:
{:igniter, "~> 0.6", only: [:dev, :test]}- Then ran:
mix igniter.install phoenix_sync --sync-mode embeddedFirst run result (FAILS)
Igniter adds phoenix_sync to mix.exs and compiles it, but then crashes with:
** (UndefinedFunctionError) function Phoenix.Sync.MixProject.project/0 is undefined (module Phoenix.Sync.MixProject is not available)
Phoenix.Sync.MixProject.project()
(phoenix_sync 0.6.1) lib/mix/tasks/phoenix_sync.install.ex:301: Mix.Tasks.PhoenixSync.Install.required_electric_version/0
(phoenix_sync 0.6.1) lib/mix/tasks/phoenix_sync.install.ex:123: Mix.Tasks.PhoenixSync.Install.add_dependencies/2
(igniter 0.7.7) lib/igniter/util/install.ex:187: anonymous fn/3 in Igniter.Util.Install.run_installers/5
(elixir 1.20.0-rc.4) lib/enum.ex:2617: Enum."-reduce/3-lists^foldl/2-0-"/3
(igniter 0.7.7) lib/igniter/util/install.ex:176: Igniter.Util.Install.run_installers/5
(mix 1.20.0-rc.4) lib/mix/task.ex:502: anonymous fn/3 in Mix.Task.run_task/5
(mix 1.20.0-rc.4) lib/mix/cli.ex:129: Mix.CLI.run_task/2
At this point:
phoenix_synchas already been added to deps- but the installer crashes before finishing
Second run (WORKS)
Without changing anything else, I run:
mix igniter.install phoenix_sync --sync-mode embeddedNow it succeeds:
- Detects
phoenix_syncalready installed - Adds
:electric - Runs
phoenix_sync.install - Updates config and application files correctly
Observed behavior
- First run fails because
Phoenix.Sync.MixProjectis not available
Phoenix.Sync.MixProject.project() - Second run succeeds once the dependency is already compiled
What I expected
mix igniter.install phoenix_sync --sync-mode embeddedto succeed on the first run
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels