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

Better compile time error for link helper usage and actions that require params #1734

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matthewmcgarvey
Copy link
Member

Purpose

Fixes #1652

Description

This is an attempt at making link helper compile time errors better when passing in a Lucky::Action that needs params.

Screen Shot 2022-09-13 at 1 01 09 AM'

🙏 It's really late. I got the code working, but I hope you can see that the error message is a joke at the moment. Please help me with that. I am even wondering if we can access the action class in the error message to print out what is required? That might be a stretch too far though. Another thing I didn't look into is if this is useful anywhere else. I'd check anywhere we currently use Lucky::Action.class

@jwoertink
Copy link
Member

love it. ship it! also, do better 😂

@jwoertink
Copy link
Member

The code looks ok, but I would like to give this a shot with Crystal 1.6 first to see if the errors are going to change anyway. Actually... maybe it won't matter since it's not really the link that's wrong, but the action.. 🤔 I'll think about an error message in the meantime.

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.

link_to route helper shows obscure error for missing required arguments
2 participants