Compiling igniter ** (Mix) Can't continue due to errors on dependencies

i’m using the new ash installer and i’m getting an error right after compiling igniter

  • running mix deps.compile

We are almost there! The following steps are missing:

$ cd test

Then configure your database in config/dev.exs and run:

$ mix ecto.create

Start your Phoenix app with:

$ mix phx.server

You can also run your app inside IEx (Interactive Elixir) as:

$ iex -S mix phx.server

installing igniter :heavy_check_mark:
compiling igniter ⢽
compiling igniter :heavy_check_mark:
** (Mix) Can’t continue due to errors on dependencies

how can I get it to work, it looks like ash isn’t in the dependencies for the application in mix.exs, any help would be appreciated.


are the options i’m using. I’m new to ash and just trying this out for a hobby project, and i may be doing this wrong so please let me know :smiley:

I tried running just the options from the already have an app and I get this:

Issues:

  • ** (Rewrite.SourceError) could not write to file “lib/test/application.ex”: file changed since reading

Successfully installed:

  • ash
  • ash_phoenix
  • ash_postgres
  • ash_authentication
  • ash_authentication_phoenix
  • ash_csv
  • ash_admin
  • ash_state_machine
  • ash_paper_trail
  • cloak
  • ash_cloak

What OS are you using? we’ve seen this error a few times and are still trying to pin it down. So far it’s only presented on windows and ChromeOS. today I will be getting Elixir set up on my windows PC to see if I can replicate.

This is on an arm linux box (asahi linux) the plot thickens :slight_smile:

1 Like

I know this is a plea for help but this is really cool i’ll add!

1 Like

I am getting the same error on ubuntu 24.04 on ryzen 5600 with erlang OTP 26 and elixir 1.15.7

sh <(curl ‘https://ash-hq.org/new/test?install=phoenix’)
&& cd test
&& mix igniter.install
ash_phoenix ash_postgres ash_authentication
ash_authentication_phoenix ash_admin ash_state_machine
–auth-strategy password
–yes

warning: Macro.Env.define_alias/4 is undefined or private
Invalid call found at 2 locations:
lib/spitfire/env.ex:178: Spitfire.Env.expand/3
lib/spitfire/env.ex:478: Spitfire.Env.alias_defmodule/3

warning: Macro.Env.define_import/4 is undefined or private
lib/spitfire/env.ex:209: Spitfire.Env.expand/3

warning: Macro.Env.define_require/4 is undefined or private
lib/spitfire/env.ex:193: Spitfire.Env.expand/3

warning: Macro.Env.expand_alias/4 is undefined or private
lib/spitfire/env.ex:137: Spitfire.Env.expand/3

warning: Macro.Env.expand_import/5 is undefined or private
lib/spitfire/env.ex:308: Spitfire.Env.expand/3

warning: Macro.Env.expand_require/6 is undefined or private
lib/spitfire/env.ex:274: Spitfire.Env.expand/3

installing igniter :heavy_check_mark:
compiling igniter ⣷
compiling igniter :heavy_check_mark:
** (Mix) Can’t continue due to errors on dependencies

Any ideas?

It appears I was wrong, this happens for me as well, on Mac. this is not the same as the OS specific bug. Working on it now.

Hey folks, mind trying again?

I’m picking up some items from store will try right when i get back.

Yes that works now!

Many thanks!

Now to go have a play!

Shifters

1 Like

Working here too!

1 Like

actually @zachdaniel i spoke too soon:

  • running mix deps.compile

We are almost there! The following steps are missing:

$ cd test

Then configure your database in config/dev.exs and run:

$ mix ecto.create

Start your Phoenix app with:

$ mix phx.server

You can also run your app inside IEx (Interactive Elixir) as:

$ iex -S mix phx.server

installing igniter :heavy_check_mark:
compiling igniter :heavy_check_mark:
setting up igniter :heavy_check_mark:
compiling ash :heavy_check_mark:
ash.install :heavy_check_mark:

Successfully installed:

  • ash
    checking for igniter in project :heavy_check_mark:
    compiling igniter :heavy_check_mark:
    setting up igniter :heavy_check_mark:
    compiling ash_phoenix, ash_json_api, ash_postgres, ash_authentication, ash_authentication_phoenix, ash_csv, ash_state_machine, ash_paper_trail, cloak, ash_cloak :heavy_check_mark:
    compiling open_api_spex :heavy_check_mark:
    ash_json_api.install :heavy_check_mark:
    ash_postgres.install :heavy_check_mark:
    installing new dependencies :heavy_check_mark:
    ash_authentication.install :heavy_check_mark:
    ash_authentication_phoenix.install :heavy_check_mark:

Issues:

  • ** (Rewrite.SourceError) could not write to file “lib/test/application.ex”: file changed since reading

Successfully installed:

  • ash_phoenix
  • ash_json_api
  • ash_postgres
  • ash_authentication
  • ash_authentication_phoenix
  • ash_csv
  • ash_state_machine
  • ash_paper_trail
  • cloak
  • ash_cloak

i’m using elixir 1.81.1 and otp 26

Okay, so this is the bug that appears to happen anywhere but where I can see it :sweat_smile:

I’ve tried to reproduce with all kinds of configurations, and now both on windows and on Mac. I’m not really sure how to proceed in that scenario. From what I can tell rewrite (maybe @Marcus can help us here?) is comparing the old file with the new file using :erlang.phash and I cannot possibly conceive of a reason why it would have changed in any way. The file is generated in this case first by Phoenix, and then when we first read it into the igniter it should be the same as it originally was.

Was the windows machine on a snapdragon? Between Mac and me trying to do a sideproject on Asahi linux would be interesting to see if it was arm specific, but that wouldn’t make much sense with the beam providing the abstractions. Is there anything I can do do get you more data?

could be newer versions of elixir with type issues, but I didn’t see any warnings that way…

The only thing I can really think of would be to clone igniter down manually, and then after making your new project, set {:igniter, path: "../path_to_igniter", only: [:dev, :test]}.

Then, you’d have to modify the files in igniter, right around here before we attempt to write the files:

And add something like this:

path = "lib/hillbilly_millionaire/application.ex"
source = Rewrite.source!(igniter.rewrite, path)

file = File.read!(path)
igniter_original_contents = Rewrite.Source.get(source, :content, 1)

# Did the path somehow change?
IO.inspect(Rewrite.Source.get(source, :path, 1))
IO.inspect(Rewrite.Source.get(source, :path))

# inspect the outputs for differences

IO.puts(igniter_original_content)
IO.puts(file)

# some other things that would be good to check
`IO.inspect(source.hash)`
`IO.inspect(:erlang.phash2({path, file}))`
`IO.inspect(:erlang.phash2({path, igniter_original_content}))`

Then you can run the igniter.install step (the part after curl in the script) and maybe that would point us to the problem. Its a lot to ask but if you’re willing to do it I’d be very grateful :bowing_man:

Hey man, i’m here for the party let’s figure it out :smiley:

1 Like

lol you aren’t going to like the answer, i pulled the 5.11 tag of igniter and it just worked

*actually disregard, still debugging.

alright this is elusive as all get out, i’m resorting to iex in debug and pry, what is weird is the tests all pass too and I see some specific to this, i’m gonna call it for the day but will keep digging and let you know.

1 Like