-
-
Notifications
You must be signed in to change notification settings - Fork 122
Closed
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
main
Operating system
mac os last version
Current Behavior
Running mix ash.codegen crashes with a KeyError when a check_constraints references a field that doesn’t exist in the resource. The error message doesn’t clearly indicate which field caused the issue
➜ mishka_cms git:(master) ✗ mix ash.codegen mishka_file
Getting extensions in current project...
Running codegen for AshGraphql.Resource...
Running codegen for AshPostgres.DataLayer...
** (KeyError) key :source not found in: nil
If you are using the dot syntax, such as map.field, make sure the left-hand side of the dot is a map
(ash_postgres 2.6.23) lib/migration_generator/migration_generator.ex:3163: anonymous fn/2 in AshPostgres.MigrationGenerator.check_constraints/1
(elixir 1.18.4) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2
(ash_postgres 2.6.23) lib/migration_generator/migration_generator.ex:3158: anonymous fn/2 in AshPostgres.MigrationGenerator.check_constraints/1
(elixir 1.18.4) lib/enum.ex:1714: Enum."-map/2-lists^map/1-1-"/2
(ash_postgres 2.6.23) lib/migration_generator/migration_generator.ex:3110: AshPostgres.MigrationGenerator.do_snapshot/3
(ash_postgres 2.6.23) lib/migration_generator/migration_generator.ex:3100: AshPostgres.MigrationGenerator.get_snapshots/2
(elixir 1.18.4) lib/enum.ex:4442: Enum.flat_map_list/2
(elixir 1.18.4) lib/enum.ex:4445: Enum.flat_map_list/2
Reproduction
No response
Expected Behavior
Show what resource has this problem at least! or migration!
Thank you in advance
Ref: https://discord.com/channels/711271361523351632/1259099945366061110/1436989926246846524
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working