-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Recommend to use latest version #5757
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
Conversation
Fixes #5702 |
Codecov Report
@@ Coverage Diff @@
## develop #5757 +/- ##
==========================================
Coverage ? 28.21%
==========================================
Files ? 339
Lines ? 32699
Branches ? 3943
==========================================
Hits ? 9226
Misses ? 22778
Partials ? 695
|
@@ -29,7 +31,7 @@ Instructions about how to build and install the Solidity compiler can be found i | |||
A "Hello World" program in Solidity is of even less use than in other languages, but still: | |||
|
|||
``` | |||
pragma solidity ^0.4.16; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone requested to use the pragma range as wide as possible to show when certain features were introduced. I'm fine to relax this for this code snippet - but I'm not sure we will be able to keep it up to date. Perhaps make this ^0.5.0
? We could also extend the compilation tests in isolate_tests.py
to cover the readme - this will check if it can be compiled with the current version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good compromise, updated in fulldecent@0842ac6
Created separate issue to track that update at #5767
@@ -29,7 +31,7 @@ Instructions about how to build and install the Solidity compiler can be found i | |||
A "Hello World" program in Solidity is of even less use than in other languages, but still: | |||
|
|||
``` | |||
pragma solidity ^0.4.16; | |||
pragma solidity ^0.5.2; | |||
|
|||
contract HelloWorld { | |||
function helloWorld() external pure returns (string memory) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10 lines down there are links to the documentation with hardcoded version number - we should use something like latest
or develop
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you saying to add a variable into the RST file and update everything at once? Or are you recommending a change to the pragma
directive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I'm saying the link could be https://solidity.readthedocs.io/en/latest/solidity-by-example.html#voting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(10 lines down from here)
docs/index.rst
Outdated
@@ -19,6 +19,8 @@ user-defined types among other features. | |||
With Solidity you can create contracts for uses such as voting, crowdfunding, blind auctions, | |||
and multi-signature wallets. | |||
|
|||
When deploying contracts, you should use the latest released version of Solidity because bug fixes are rarely, if ever, back-ported to older versions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps also mention that we are making breaking changes often and so on like in the issue description?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in fulldecent@fb7b55d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated in fulldecent@fb7b55d
Looks good! Please rebase and squash into a single commit. |
@@ -19,6 +19,8 @@ that run on the Ethereum Virtual Machine. Smart contracts are programs that are | |||
network where nobody has special authority over the execution and thus they allow to implement tokens of value, | |||
ownership, voting and other kinds of logics. | |||
|
|||
When deploying contracts, you should use the latest released version of Solidity. This is because breaking changes as well as new features and bug fixes are introduced regularly. We currently use a 0.x version number [to indicate this fast pace of change](https://semver.org/#spec-item-4). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this may slightly misleading to say that if the major number would be 1, then bumping it wouldn't mean a breaking change. Though I understand where you're coming from, being in major number 0 suggests changes are more frequent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intentionally left out any mention of what happens at >= 1.0 so as not to make commitments on your behalf. But presumably, we would follow normal semver practices at that time and update the statement here.
@@ -37,12 +37,12 @@ breaking changes, those releases will always have versions of the form | |||
|
|||
The version pragma is used as follows:: | |||
|
|||
pragma solidity ^0.4.0; | |||
pragma solidity ^0.5.2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to use 0.5.2 and not 0.5.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's a nice example.
Recommend developers to use our latest released version of Solidity. And also follow our own advice.