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

Fix --standard-json #246

Closed
wants to merge 1 commit into from
Closed

Fix --standard-json #246

wants to merge 1 commit into from

Conversation

y-yamagata
Copy link

Fix

@coveralls
Copy link

Coverage Status

Coverage remained the same at 61.594% when pulling d801b46 on y-yamagata:fix-standard-json into 14b4b37 on ethereum:master.

@westandy-dcp
Copy link

I thought the purpose of --standard-json was to output a json file from the solcjs compilation. But this looks like it's tryin to compile JSON provided to the solcjs?

@y-yamagata
Copy link
Author

I thought the purpose of --standard-json was to output a json file from the solcjs compilation. But this looks like it's tryin to compile JSON provided to the solcjs?

As far as I read original master code, I look like it is used as compile option.

https://github.com/ethereum/solc-js/blob/master/solcjs#L53

if (argv['standard-json']) {
  var size = fs.fstatSync(process.stdin.fd).size;

  if (size <= 0) {
    abort('Empty input was read');
  }

  var input = fs.readSync(process.stdin.fd, size)[0];

  console.log(solc.compileStandardWrapper(input));
  process.exit(0);
}

Is it not necessary to read standard input for output?

@axic
Copy link
Member

axic commented Dec 3, 2018

Thank you for your patch, this has been fixed now by #127.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants