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

fix error when typeDescriptions missing #240

Closed
wants to merge 1 commit into from

Conversation

hananbeer
Copy link

I'm working on an AST tool and it just happens to be convenient to omit unnecessary fields.
the typeDescriptions field isn't really necessary for the AST compilation using sol-ast-compile yet when it throws an error when it is missing.

@CLAassistant
Copy link

CLAassistant commented Dec 10, 2023

CLA assistant check
All committers have signed the CLA.

@blitz-1306
Copy link
Contributor

Hello, and sorry for the late response. End of the previous year got me preoccupied. A few questions:

  1. Would you be able to provide a use when the issue occurs? The issue is occuring on a certain Solidity sample or compiler version?
  2. Can we figure out a test for the changes?

Thank you.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d35f0de) 91.59% compared to head (af7de23) 91.59%.
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #240   +/-   ##
=======================================
  Coverage   91.59%   91.59%           
=======================================
  Files         267      267           
  Lines        6630     6630           
  Branches     1353     1353           
=======================================
  Hits         6073     6073           
  Misses        291      291           
  Partials      266      266           

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

@cd1m0
Copy link
Contributor

cd1m0 commented Jan 18, 2024

We try to give as much of the compiler information to downstream consumers as possible. All solc-compiler versions support typeStrings, so we expect and provide them to consumers. It gets more inconvenient for downstream consumers if they always have to check if typestrings are there or not. Their code gets simpler if they can always assume they are there.

Internally, during AST-building we don't depend on typestrings, so you can easily provide an empty string for typeStrings and it should work in your case.

I hope this workaround helps with your use-case!

@cd1m0 cd1m0 closed this Jan 18, 2024
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.

5 participants