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 DSL Expression Compilation #89

Merged
merged 3 commits into from
Apr 10, 2024
Merged

Conversation

KetanReddy
Copy link
Member

@KetanReddy KetanReddy commented Apr 2, 2024

Currently, if there is an error in a DSL expression when it is compiled you will get the underling error in the file that may look like this:

✖ Error compiling src/content/main.tsx: Expected ) at character 13

Which doesn't give a ton of information about where the error actually is as the message is localized to just the string that is being parsed. We don't have enough information to point the error message at the line in the source file that originates the error since we're not quite at compilation yet so the best we can do is also print out the expression that contains the error and point to where in the expression the error is. So now you get:

✖ Error compiling src/content/main.tsx: Expected ) at character 13 in expression: 
      something(1,2█

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major

Release Notes

DSL - Better error messages for expressions with errors during DSL compilation

@KetanReddy KetanReddy added the patch Increment the patch version when merged label Apr 2, 2024
@KetanReddy KetanReddy self-assigned this Apr 2, 2024
@KetanReddy KetanReddy marked this pull request as ready for review April 3, 2024 22:08
@KetanReddy KetanReddy requested a review from adierkens as a code owner April 3, 2024 22:08
Copy link

codecov bot commented Apr 3, 2024

Codecov Report

Attention: Patch coverage is 64.70588% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 77.32%. Comparing base (bc6140b) to head (f3f383e).

Files Patch % Lines
language/dsl/src/string-templates/index.ts 64.70% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #89      +/-   ##
==========================================
- Coverage   77.36%   77.32%   -0.04%     
==========================================
  Files          62       62              
  Lines       10443    10456      +13     
  Branches     1089     1091       +2     
==========================================
+ Hits         8079     8085       +6     
- Misses       2345     2352       +7     
  Partials       19       19              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@KetanReddy KetanReddy requested a review from rafbcampos April 4, 2024 17:27
@KetanReddy KetanReddy added this pull request to the merge queue Apr 9, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 9, 2024
@KetanReddy KetanReddy added this pull request to the merge queue Apr 9, 2024
@KetanReddy KetanReddy removed this pull request from the merge queue due to the queue being cleared Apr 9, 2024
@KetanReddy KetanReddy merged commit 4c0c815 into main Apr 10, 2024
6 of 8 checks passed
@KetanReddy KetanReddy deleted the feat/better-dsl-expressions branch April 10, 2024 05:00
@intuit-svc intuit-svc mentioned this pull request Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants