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

Semver checker doesn't work with ^0 #5081

Closed
axic opened this issue Sep 25, 2018 · 9 comments
Closed

Semver checker doesn't work with ^0 #5081

axic opened this issue Sep 25, 2018 · 9 comments

Comments

@axic
Copy link
Member

axic commented Sep 25, 2018

k.sol:1:1: Error: Source file requires different compiler version (current compiler is 0.5.0-develop.2018.9.24+commit.c9290462.mod.Darwin.appleclang - note that nightly builds are considered to be strictly less than the released version
pragma solidity ^0;
^-----------------^

I think ^0 should work for any 0.y.z version, but I may be mistaken.

@chriseth
Copy link
Contributor

If someone takes this, please check if it should work or not.

@mestorlx
Copy link
Contributor

mestorlx commented Sep 27, 2018

According to the docs that should not work since will allow only the right most number to be anything to avoid breaking changes. However, this is not the behaivour specified in npm, and the docs clearly state that "It is possible to specify much more complex rules for the compiler version, the expression follows those used by npm."

If I am not mistaken theres is a contradiction in the documentation.

@mestorlx
Copy link
Contributor

I do believe there is an issue if npm rules are accepted. According to npm docs "A missing minor and patch values will desugar to zero, but also allow flexibility within those values, even if the major version is zero." so
pragma solidity ^0.4.0; and pragma solidity ^0.4; should be equivalent, however the latter does not work in Version: 0.4.26-develop.2018.9.27. The version of solc installed by brew (Version: 0.4.8) both samples compile so maybe is an intended change.

@christianparpart
Copy link
Member

That is exactly how I understand it too @mestorlx. @chriseth if you agree, I'd take this one over.

@christianparpart christianparpart self-assigned this Oct 1, 2018
@christianparpart christianparpart removed their assignment Feb 4, 2019
@HenryRLee
Copy link
Contributor

Can I take this one if no one is working on it?

@erak
Copy link
Collaborator

erak commented Oct 25, 2019

@HenryRLee Sure. This one is up for grabs. Please assign yourself then.

@HenryRLee
Copy link
Contributor

Thanks, @erak. I'll start working on it. But I don't think I have the privilege to self-assign.

@erak erak assigned erak and HenryRLee and unassigned erak Oct 25, 2019
@erak
Copy link
Collaborator

erak commented Oct 25, 2019

Great! I've assigned this issue to you now. Thanks.

chriseth added a commit that referenced this issue Dec 5, 2019
Version Checker: 0.5.x-prerelease will match `pragma solidity ^0.5` #5081
@chriseth
Copy link
Contributor

chriseth commented Dec 5, 2019

Fixed by #7583

@chriseth chriseth closed this as completed Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants