Open
Conversation
Member
stathis-alexander
left a comment
There was a problem hiding this comment.
Thanks for the contribution! A couple of quick to address comments below, then we can go ahead and merge and I can push a new release.
lib/tapioca/dsl/compilers/devise.rb
Outdated
|
|
||
| sig { override.returns(T::Enumerable[Module]) } | ||
| def gather_constants | ||
| return [] unless defined?(::Devise) |
Member
There was a problem hiding this comment.
It's more common to skip the definition of the compiler completely if the corresponding gem or classes are not defined. See this example: https://github.com/Shopify/tapioca/blob/main/lib/tapioca/dsl/compilers/graphql_input_object.rb#L4
f8dbd48 to
b3cb1d4
Compare
stathis-alexander
approved these changes
Feb 23, 2025
Author
|
Fixing the typechecking... |
Member
|
We may not currently add all the rails packages required (application controller). I can take a look too if you get stuck. Let me know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a compiler for Devise's helpers:
https://github.com/heartcombo/devise/blob/fec67f98f26fcd9a79072e4581b1bd40d0c7fa1d/lib/devise/controllers/helpers.rb#L89
I don't have a lot of experience writing DSL compilers so feedback is welcome.