AE
Ash Elixir•3y ago
Tsilva

cannot use pin operator ^agg_authorize?

Hey guys, going through the tutorial but am getting the error above when compiling. im on ash 2.6.29
5 Replies
Tsilva
TsilvaOP•3y ago
If I lock to 2.6.21 and add spark at "~> 0.3" it compiles [ {:ash, "2.6.21"}, {:spark, "~> 0.3"} ]
ZachDaniel
ZachDaniel•3y ago
🤔 I think this may be an elixir version issue can I see the full error?
Tsilva
TsilvaOP•3y ago
hmm maybe your right tsilva@Tonys-MacBook-Pro-2 helpdesk git:(main) ✗ mix compile ==> spark warning: the dependency :spark requires Elixir "~> 1.13" but you are running on v1.12.3 Compiling 21 files (.ex) warning: module Mix.Tasks.Format is not a behaviour (in module Spark.Formatter) lib/spark/formatter.ex:1: Spark.Formatter (module) Generated spark app ==> ash Compiling 356 files (.ex) warning: this check/guard will always yield the same result lib/ash/api/dsl.ex:145 warning: this check/guard will always yield the same result lib/ash/data_layer/mnesia/mnesia.ex:49 warning: this check/guard will always yield the same result lib/ash/registry/dsl.ex:66 warning: this check/guard will always yield the same result lib/ash/policy/authorizer.ex:273 warning: this check/guard will always yield the same result lib/ash/notifier/pub_sub/pub_sub.ex:114 warning: this check/guard will always yield the same result lib/ash/data_layer/ets/ets.ex:53 warning: this check/guard will always yield the same result lib/ash/registry/extensions/resource_validations/resource_validations.ex:12 warning: this check/guard will always yield the same result lib/ash/data_layer/simple/simple.ex:9 == Compilation error in file lib/ash/actions/aggregate.ex == ** (CompileError) lib/ash/actions/aggregate.ex:85: cannot use pin operator ^agg_authorize? inside a data structure as a map key in a pattern. The pin operator can only be used as the whole key (stdlib 3.15) lists.erl:1267: :lists.foldl/3 (stdlib 3.15) lists.erl:1358: :lists.mapfoldl/3 (stdlib 3.15) lists.erl:1359: :lists.mapfoldl/3 expanding macro: Ash.Tracer.telemetry_span/3 could not compile dependency :ash, "mix compile" failed. You can recompile this dependency with "mix deps.compile ash", update it with "mix deps.update ash" or clean it with "mix deps.clean ash" im on elixir *1.12.3-otp-24 warning: the dependency :spark requires Elixir "~> 1.13" but you are running on v1.12.3
ZachDaniel
ZachDaniel•3y ago
Did updating elixir resolve this?
pratos
pratos•3y ago
Can confirm upgrading to 1.14 resolves this issue

Did you find this page helpful?