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

Fixes issues #145 and #147 #148

Closed
wants to merge 8 commits into from
Closed

Fixes issues #145 and #147 #148

wants to merge 8 commits into from

Conversation

gsalzer
Copy link

@gsalzer gsalzer commented Mar 27, 2022

What I did

Modified the parsing of the pragma string in order to

  • remove leading zeros that are accepted by solc but are not accepted by semantic_version
  • handle sequences of constraints correctly, like >=0.5.4 <=0.5.9

Related issue: #145 #147

Checklist

  • I have confirmed that my PR passes all linting checks
  • I have included test cases
  • I have updated the documentation (README.md)
  • I have added an entry to the changelog

gsalzer added 3 commits March 27, 2022 17:36
For `pragma_string="pragma solidity =0.6.11 >=0.6.0 <0.8.0 >=0.6.2 <0.8.0;"`, the expression `comparator_regex.findall(comparator_set)` returns only a single match, `[('<0.8.0', '<')]`, instead of `[('=0.6.11', '='), ('>=0.6.0', '>='), ('<0.8.0', '<'), ('>=0.6.2', '>='), ('<0.8.0', '<')]`. The reason is the extra `+` operator in the expression.
The Solidity compiler accepts version numbers like `0.5.01`, whereas `semantic_version` does not. To keep `py-solc-x` compatible with the way `solc` parses versions, we remove leading zeros before handing the information over to semantic_version.
When handing over a list of versions specifications to SimpleSpec,
these of the be separated by commas
@gsalzer gsalzer changed the title Fixes to issues #145 and #147 Fixes issues #145 and #147 Mar 27, 2022
gsalzer added 4 commits April 16, 2022 22:10
Locks acquired by one user when downloading a compiler will prevent other users from doing the same, because the name of the lock file depends only on the solc version, but not on the user id, and the lock file is owned by the first user.
@antazoey
Copy link
Member

antazoey commented Nov 9, 2023

Also fixed by #161 by switching to packaging.version.Version and their spec sets ( with some adjusting).

Vyperlang/vvm did the same thing I noticed.

We are dusting and cleaning this package up.
Closing in favor of #161

btw, I added tests on that PR to ensure it is fixed

@antazoey antazoey closed this Nov 9, 2023
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