Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Ash.Generator): Replace calls to create and create_many with generate and generate_many #1701

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

sevenseacat
Copy link
Contributor

Currently, attempting to use Ash.Generator in tests will raise a warning:

Compiling 1 file (.ex)
    warning: Ash.Generator.create/1 is undefined or private
    │
  4 │   use Ash.Generator
    │   ~~~~~~~~~~~~~~~~~
    │
    └─ test/support/generator.ex:4: Tunez.Generator.create/1

    warning: Ash.Generator.create_many/1 is undefined or private. Did you mean:

          * generate_many/2

    │
  4 │   use Ash.Generator
    │   ~~~~~~~~~~~~~~~~~
    │
    └─ test/support/generator.ex:4: Tunez.Generator.create_many/1

@sevenseacat
Copy link
Contributor Author

sevenseacat commented Jan 8, 2025

Though I'm not sure this is right - I'm still seeing errors when trying to use Ash.Generator 🤔

Compiling 31 files (.ex)
    error: imported Ash.Generator.generate/1 conflicts with local function
    │
  4 │   use Ash.Generator
    │   ^^^^^^^^^^^^^^^^^
    │
    └─ test/support/generator.ex:4: Tunez.Generator (module)

I don't have any generate functions in my code anywhere, so it must be coming from Ash.Generator internally?

@zachdaniel zachdaniel merged commit e43f18f into ash-project:main Jan 8, 2025
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants