-
-
Notifications
You must be signed in to change notification settings - Fork 52
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Code of Conduct
- I agree to follow this project's Code of Conduct
AI Policy
- I agree to follow this project's AI Policy, or I agree that AI was not used while creating this issue.
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
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Soon