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 block with no param generation #874

Merged
merged 3 commits into from
Mar 25, 2022

Conversation

pjambet
Copy link
Contributor

@pjambet pjambet commented Mar 25, 2022

Motivation

The issue occured when running the dsl command for an
ActiveSupport::CurrentAttributes class with a method accepting a block
with type: T.proc.void, resulting in the invalid .params() being
generated.

Implementation

The fix is a total shot in the dark, and I have no idea if it's a good approach, or if there's a better one

Tests

The test change is almost 1:1 the issue I faced in my own code

The issue occured when running the dsl command for an
ActiveSupport::CurrentAttributes class with a method accepting a block
with type: `T.proc.void`, resulting in the invalid `.params()` being
generated.
@pjambet pjambet requested review from paracycle and vinistock March 25, 2022 19:40
@paracycle
Copy link
Member

Thanks, this looks great. I took the liberty of pushing the sanitization one level down into the create_typed_param, so that all the other param helper methods use it as well.

@paracycle paracycle enabled auto-merge March 25, 2022 22:20
@paracycle paracycle disabled auto-merge March 25, 2022 22:20
@paracycle paracycle force-pushed the pj/fix-blocks-in-current-attributes branch from 0fedb73 to a13a08b Compare March 25, 2022 22:21
@paracycle paracycle enabled auto-merge March 25, 2022 22:21
@paracycle paracycle merged commit d2e2055 into main Mar 25, 2022
@paracycle paracycle deleted the pj/fix-blocks-in-current-attributes branch March 25, 2022 23:09
paracycle added a commit that referenced this pull request Mar 29, 2022
paracycle added a commit that referenced this pull request Mar 29, 2022
paracycle added a commit that referenced this pull request Mar 29, 2022
@paracycle paracycle added the backported Backported to stable branch label Apr 29, 2022
@shopify-shipit shopify-shipit bot temporarily deployed to production May 13, 2022 23:08 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported Backported to stable branch bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants