Skip to content

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

Merged
merged 1 commit into from
Jan 10, 2019
Merged

Recommend to use latest version #5757

merged 1 commit into from
Jan 10, 2019

Conversation

fulldecent
Copy link
Contributor

Recommend developers to use our latest released version of Solidity. And also follow our own advice.

@fulldecent
Copy link
Contributor Author

Fixes #5702

@fulldecent fulldecent mentioned this pull request Jan 7, 2019
1 task
@codecov
Copy link

codecov bot commented Jan 7, 2019

Codecov Report

❗ No coverage uploaded for pull request base (develop@950e193). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #5757   +/-   ##
==========================================
  Coverage           ?   28.21%           
==========================================
  Files              ?      339           
  Lines              ?    32699           
  Branches           ?     3943           
==========================================
  Hits               ?     9226           
  Misses             ?    22778           
  Partials           ?      695
Flag Coverage Δ
#syntax 28.21% <ø> (?)

@@ -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;
Copy link
Contributor

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.

Copy link
Contributor Author

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) {
Copy link
Contributor

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.

Copy link
Contributor Author

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@chriseth chriseth Jan 9, 2019

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.
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in fulldecent@fb7b55d

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in fulldecent@fb7b55d

@fulldecent fulldecent mentioned this pull request Jan 9, 2019
@chriseth
Copy link
Contributor

chriseth commented Jan 9, 2019

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).
Copy link
Member

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.

Copy link
Contributor Author

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;
Copy link
Member

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?

Copy link
Contributor

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.

@chriseth chriseth merged commit e63aa03 into ethereum:develop Jan 10, 2019
@fulldecent fulldecent deleted the feature-latest-version branch January 10, 2019 12:08
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.

3 participants