Skip to content

cmd/evm: change error msg output to stderr#17118

Merged
karalabe merged 2 commits into
ethereum:masterfrom
terasum:fix-evm-cmd
Jul 31, 2018
Merged

cmd/evm: change error msg output to stderr#17118
karalabe merged 2 commits into
ethereum:masterfrom
terasum:fix-evm-cmd

Conversation

@terasum

@terasum terasum commented Jul 3, 2018

Copy link
Copy Markdown
Contributor

use the ctx.Writer and ctx.ErrWriter as output witer,

before:

$> ./evm compile test.sol 2>/dev/null
test.sol:0 syntax error: unexpected hello, expected end of line
test.sol:0 syntax error: unexpected EOF, expected new line

after:

$> ./evm compile test.sol 2>/dev/null

@terasum

terasum commented Jul 4, 2018

Copy link
Copy Markdown
Contributor Author

@karalabe I'm sorry fixed an insignificant code, but can you take a look, please?

@fjl fjl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a good change, but please fix the linter errors: https://travis-ci.org/ethereum/go-ethereum/jobs/399649306#L502

@terasum

terasum commented Jul 31, 2018

Copy link
Copy Markdown
Contributor Author

@fjl Thanks for your review, I have fixed the linter error, would you like take a look again?

@karalabe karalabe added this to the 1.8.13 milestone Jul 31, 2018

@karalabe karalabe left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@karalabe
karalabe merged commit fb9f726 into ethereum:master Jul 31, 2018
@karalabe

karalabe commented Aug 1, 2018

Copy link
Copy Markdown
Member

Unfortunately this PR actually broke the evm utility. ctx.App.ErrWriter is usually nil, which causes evm to panic. As such, I don't really see the benefit of this rewrite any more, will revert.

karalabe added a commit that referenced this pull request Aug 1, 2018
Revert "cmd/evm: change error msg output to stderr (#17118)"
firmianavan pushed a commit to firmianavan/go-ethereum that referenced this pull request Aug 28, 2018
* cmd/evm: change error msg output to stderr

* cmd/evm: fix some linter error
firmianavan pushed a commit to firmianavan/go-ethereum that referenced this pull request Aug 28, 2018
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