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

improvement: add DataCase creation for igniter installer #344

Conversation

ibarakaiev
Copy link
Contributor

Contributor checklist

  • Bug fixes include regression tests
  • Features include unit/acceptance tests

This PR sets up DataCase for testing purposes, unless it already exists, and adds test to elixirc_paths in mix.exs unless elixirc_paths are already defined. For fresh Mix projects, this will do both; for existing Phoenix projects, nothing will happen. This makes it possible to use AshPostgres out of the box even in tests.

Note: this PR is pending ash-project/igniter#38 and ash-project/igniter#37, so it is marked as a draft.

@ibarakaiev
Copy link
Contributor Author

One side effect of this change is that, when running apply_and_fetch_dependencies/2, the changes to elixirc_paths and the new functions show up, which appear a bit confusing when only dependencies need to be installed.

@zachdaniel
Copy link
Contributor

Got a few things here:

  1. I think that the test/support setup should be code that lives in something like Igniter.Project.Test, and it should potentially happen automatically if you add a file to test/support.
  2. We probably need to make the code for applying dependency changes only apply diffs from the deps/0 function? Is the place that you are calling it manually in ash_money? Maybe we can make adjustments to that process instead.

@zachdaniel
Copy link
Contributor

Will come back to this once the main installer is merged.

@zachdaniel
Copy link
Contributor

Closing in favor of #346

@zachdaniel zachdaniel closed this Jul 10, 2024
@zachdaniel
Copy link
Contributor

🚀 Thank you for your contribution! 🚀

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