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

Add support for loading custom DSL extensions #1602

Merged

Conversation

olivier-thatch
Copy link
Contributor

@olivier-thatch olivier-thatch commented Aug 11, 2023

Motivation

This PR adds support for loading custom extension classes in addition to Tapioca's built-in extensions. See #1600 for more details.

Implementation

Updated Tapioca::Loaders::Dsl.load_dsl_extensions to behave similarly to Tapioca::Loaders::Dsl.load_dsl_compilers and require all Ruby files found in sorbet/tapioca/extensions.

Tests

Added automatests to spec/tapioca/cli/dsl_spec.rb.

@bitwise-aiden
Copy link
Contributor

Hi Olivier,

Thanks so much for the contribution. This looks like a good addition to the repo. Given this is a new feature, could you please spend a bit of time adding some documentation to the readme to ensure that this is discoverable?

Also regarding tests, it looks like @Morriar had started creating some in this commit if you wanted to pluck what would be relevant to this change.

@olivier-thatch
Copy link
Contributor Author

@bitwise-aiden I updated the README and added a couple of tests. Let me know what you think!

Copy link
Contributor

@bitwise-aiden bitwise-aiden left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks for the contribution.

@bitwise-aiden bitwise-aiden merged commit feb98e0 into Shopify:main Aug 16, 2023
15 checks passed
@olivier-thatch olivier-thatch deleted the olivier-load-custom-extensions branch August 22, 2023 20:07
@shopify-shipit shopify-shipit bot temporarily deployed to production September 13, 2023 22:55 Inactive
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.

None yet

3 participants