You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the contract update validation, errors can be reported for the old program in two occasions:
When parsing the old program
When validating the new program against the old one
The first case (parser errors) now uses the correct (old) code for pretty-printing after the fix: #3554.
However, it is still possible to report errors using the old positions during validation (2nd case above). For e.g:
Getting root declaration reports the error using the old declaration's position
Validating the type-removal pragma, also uses old code's position info for reporting errors
Given the update validator doesn't fail on the first error, having errors with position info from both old and new codes is problematic, because the pretty-printer can only use one of the two versions of code (either the new or the old code) at a given time, and will point to incorrect positions during pretty-printing the errors.
Expected Behavior
Error reporting probably need to use new code's position info, always.
Steps To Reproduce
N/A
Environment
- Cadence version: master
- Network:
The text was updated successfully, but these errors were encountered:
Current Behavior
During the contract update validation, errors can be reported for the old program in two occasions:
The first case (parser errors) now uses the correct (old) code for pretty-printing after the fix: #3554.
However, it is still possible to report errors using the old positions during validation (2nd case above). For e.g:
Given the update validator doesn't fail on the first error, having errors with position info from both old and new codes is problematic, because the pretty-printer can only use one of the two versions of code (either the new or the old code) at a given time, and will point to incorrect positions during pretty-printing the errors.
Expected Behavior
Error reporting probably need to use new code's position info, always.
Steps To Reproduce
N/A
Environment
The text was updated successfully, but these errors were encountered: