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: support :kind in find_and_update_or_create_module/5 #38

Merged

Conversation

ibarakaiev
Copy link
Contributor

Contributor checklist

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

Sometimes it is necessary to create a new module of a certain kind, i.e. a test or a test support, for which we have helpers to get their idiomatic location. This PR slightly refactors find_and_update_or_create_module/5 in a backwards-compatible way to support an optional :kind flag, which defaults to :lib, but also supports :test and :test_support.

@zachdaniel
Copy link
Contributor

I like the idea of the path option, but I'm not a big fan of the :kind option, TBH. But with the path option you could very easily do something like path: Module.proper_test_location(...). Could we start w/ just that path option?

Copy link
Contributor

@zachdaniel zachdaniel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think just the path name should be provided.

@zachdaniel zachdaniel merged commit 8e71283 into ash-project:main Jul 10, 2024
15 checks passed
@zachdaniel
Copy link
Contributor

Going to merge this and remove the kind option in favor of just the path option :)

@zachdaniel
Copy link
Contributor

🚀 Thank you for your contribution! 🚀

@ibarakaiev ibarakaiev deleted the support-kind-in-creating-module branch July 16, 2024 19:20
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