Code of Conduct
AI Policy
Versions
Elixir: 1.18.4
Erlang: 27
Operating system
Ubuntu inside Windows WSL
Current Behavior
Trying to update dependency with add_dep like this:
|> Igniter.Project.Deps.add_dep(
{:esbuild, "~> 0.10", runtime: quote(do: Mix.env() == :dev)},
)
Current behaviour
In "Desired" and "Found", we get this:
Desired: `{:esbuild, "~> 0.10", [runtime: {:==, [context: Phoenix.LiveView.Igniter.UpgradeTo1_1, imports: [{2, Kernel}]], [{{:., [], [{:__aliases__, [alias: false], [:Mix]}, :env]}, [], []}, :dev]}]}`
Found: `{:esbuild, "~> 0.8", [runtime: true]}`
For "Desired", the AST of quote(do: Mix.env() == :dev) is printed.
For "Found", Mix.env() == :dev has been evaluated.
Expected behaviour
Here is what we should have in best case:
Desired: `{:esbuild, "~> 0.10", runtime: Mix.env() == :dev}`
Found: `{:esbuild, "~> 0.8", runtime: Mix.env() == :dev}`
Related PR
Related to phoenixframework/phoenix_live_view#4011 (comment)
Reproduction
Trying to update a dependency with add_dep like this:
|> Igniter.Project.Deps.add_dep(
{:esbuild, "~> 0.10", runtime: quote(do: Mix.env() == :dev)},
)
Dedicated branch with the issue in a fork of phoenix_live_view: phoenixframework/phoenix_live_view@main...aifrak:phoenix_live_view:igniter-issue-add-deps
Expected Behavior
No response
Code of Conduct
AI Policy
Versions
Elixir: 1.18.4
Erlang: 27
Operating system
Ubuntu inside Windows WSL
Current Behavior
Trying to update dependency with
add_deplike this:Current behaviour
In "Desired" and "Found", we get this:
For "Desired", the AST of
quote(do: Mix.env() == :dev)is printed.For "Found",
Mix.env() == :devhas been evaluated.Expected behaviour
Here is what we should have in best case:
Related PR
Related to phoenixframework/phoenix_live_view#4011 (comment)
Reproduction
Trying to update a dependency with
add_deplike this:Dedicated branch with the issue in a fork of
phoenix_live_view: phoenixframework/phoenix_live_view@main...aifrak:phoenix_live_view:igniter-issue-add-depsExpected Behavior
No response