truffle-box / tutorialtoken-box

A box containing all you need to get started with our OpenZeppelin (TutorialToken) tutorial.
MIT License
56 stars 26 forks source link

Compilation failure because of a deprecation warning from Migrations.sol:11:3: #15

Closed ghost closed 6 years ago

ghost commented 6 years ago

Issue

When I try to compile tutorialtoken-box tutorial, I get failed to compile because of a warning from Migrations.sol:11:3

I made a pull request for this issue: https://github.com/truffle-box/tutorialtoken-box/pull/14

Expected Behavior

you compile with truffle successfully

Actual Behavior

When you compile with truffle, this compilation warning encountered:

Warning: Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
  function Migrations() public {
  ^ (Relevant source part starts here and spans across multiple lines).

Steps to Reproduce the Problem

  1. run truffle unbox tutorialtoken-box
  2. run truffle compile
  3. get the warning from Migrations.sol:11:3:

Environment

Operating System: macOS high Sierra 10.13.3 Ethereum client: Ganache Truffle version (truffle version): v4.1.11 (core: 4.1.11) Solidity version: Solidity v0.4.24 (solc-js) node version (node --version): v10.3.0 npm version (npm --version): 6.1.0

benjaminmbrown commented 6 years ago

This is a common issue that's coming up across all boxes from what I've seen. Truffle team needs to get someone on board to maintain these boxes through updates to solc. Or at least merge in some of the community's trivial PR's around this. Am I missing something that makes these fixes non-trivial?

Truffle's solc versioning will mismatch contract pragma's from older boxes in perpetuity, so I think it is a valid issue that should be addressed for the community.

I'd imagine that for newcomers, it is confusing and frustrating. Also makes Truffle framework (and subsequently the team) look brittle, unpolished, and unfinished.

I'm interested in helping, but would like some input from the Truffle team on this meta-issue @bmmpxf

bmmpxf commented 6 years ago

Hi @benjaminmbrown . Thanks for the feedback. We're a small team, and we have been prioritizing breaking errors over warnings. I apologize that it's looked like we've been ignoring some issues, that's really not our intention.

I do want us to automate our code tests against newer versions of solidity, so we can be more proactive about changes like this. But in the meantime, we will get to everything, and we appreciate all the issues and PRs.

As for this particular issue, @noelyoo, looks like it was fixed a few days after it was raised. Apologies for not closing the issue sooner.