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

TEAL: Add columns to assembly error messages. #5402

Merged
merged 5 commits into from
May 26, 2023

Conversation

jannotti
Copy link
Contributor

This should let IDE integrations or lsp-like programs use the assembly output to direct the cursor the exact spot of many problems. It also allowed some error improvements and simplifications because tokens from the assembly process now know their line number.

The changes in terms of line count are big, but mostly boring. The signatures of the asm* and type* functions changed to take tokens instead of strings, which caused a lot of churn. Also, in order to minimize the work to change existing tests, I converted testProg calls so that they called exp instead of constructing an Expect. That allowed me to make the column checking optional by making the column an optional final argument to exp. I extended a bunch of tests to check columns, but many of the tests were mechanically (emacs kbd macros!) converted to exp, checking only the line number that they always checked.

This should let IDE integrations or lsp-like programs use the assembly
output to direct the cursor the exact spot of many problems. It also
allowed some error improvements and simplifications because tokens
from the assembly process now know their line number.
@jannotti jannotti changed the title Add columns to TEAL assembly error messages. TEAL: Add columns to assembly error messages. May 19, 2023
@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Merging #5402 (6cf8549) into master (5e1f8a2) will increase coverage by 0.01%.
The diff coverage is 90.88%.

@@            Coverage Diff             @@
##           master    #5402      +/-   ##
==========================================
+ Coverage   55.44%   55.46%   +0.01%     
==========================================
  Files         452      452              
  Lines       63689    63717      +28     
==========================================
+ Hits        35312    35340      +28     
- Misses      25965    25971       +6     
+ Partials     2412     2406       -6     
Impacted Files Coverage Δ
data/transactions/logic/assembler.go 92.30% <90.88%> (+1.71%) ⬆️

... and 7 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jannotti jannotti marked this pull request as ready for review May 24, 2023 19:52
@bbroder-algo
Copy link
Contributor

Neat!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants