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

Inline render_html_page to change compilation error #1373

Conversation

matthewmcgarvey
Copy link
Member

Purpose

No connected issue

Description

Before

CleanShot 2020-12-28 at 13 20 01@2x

After

CleanShot 2020-12-28 at 13 20 17@2x

Notice in the "Before" that the first code reference was a macro and not the usage site that caused the error. By removing the render_html_page we actually see the usage site in the error which will help people track down issues.

That macro was extracted here but you'll notice that this PR achieves the same level of DRY-ness without the separate macro.

Checklist

  • - An issue already exists detailing the issue/or feature request that this PR fixes
  • - All specs are formatted with crystal tool format spec src
  • - Inline documentation has been added and/or updated
  • - Lucky builds on docker with ./script/setup
  • - All builds and specs pass on docker with ./script/test

Copy link
Member

@jwoertink jwoertink left a comment

Choose a reason for hiding this comment

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

Ooo! I like this. I think this also might make it easier to pass down the status as well without having to change up the interface

@matthewmcgarvey matthewmcgarvey merged commit cff93b3 into luckyframework:master Dec 28, 2020
@matthewmcgarvey matthewmcgarvey deleted the html-rendering-error-update branch December 28, 2020 18:42
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