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

Deprecate old jsonCompiler interface #3452

Closed
axic opened this issue Feb 1, 2018 · 9 comments
Closed

Deprecate old jsonCompiler interface #3452

axic opened this issue Feb 1, 2018 · 9 comments

Comments

@axic
Copy link
Member

axic commented Feb 1, 2018

The original compiler interface for Javascript consisted of compileJSON, compileJSONMulti and compileJSONCallback as it evolved. For many releases now the "standard json" format is available via compileStandard.

Proposal is to remove these interfaces in 0.5.0. Anyone using the commandline solc tool or the solc-js library is not affected by this change.

I think every consumer of soljson uses the new interface, at least Remix and Truffle does.

Related to #2864.

@axic
Copy link
Member Author

axic commented Jun 29, 2018

This would only affect those not using solc-js. Is there anyone using soljson directly?

cc @iurimatias @gnidan @pipermerriam

@gnidan
Copy link
Member

gnidan commented Jun 29, 2018

Truffle should be using only compileStandard at this point, but cc @cgewecke in case his upcoming changes are affected by this.

@axic
Copy link
Member Author

axic commented Jun 29, 2018

Sorry, should have been more clear. Issue #2864 proposes new native function names in soljson. solc-js will be able to figure out what the underlying soljson has.

@iurimatias
Copy link
Member

Embark uses compileStandardWrapper in solc-js.

@axic
Copy link
Member Author

axic commented Jul 23, 2018

@yann300 does Remix still uses solc-js and doesn't handle soljson directly?

@yann300
Copy link
Contributor

yann300 commented Jul 24, 2018

Remix uses compileStandardWrapper and solc-js

@axic axic self-assigned this Aug 1, 2018
@axic
Copy link
Member Author

axic commented Aug 8, 2018

This is now blocked on first merging the appropriate solc-js PRs. Will do that next.

@axic
Copy link
Member Author

axic commented Sep 27, 2018

@yann300 @iurimatias @gnidan @cgewecke the plan now for 0.5.0 is that:

  • compile and compileStandard would be gone
  • compileStandardWrapper would be renamed to compile

This means all of you would need to change the code to use compile, but the format passed to or received from it wouldn't change.

@Tectract
Copy link

Tectract commented Jun 6, 2020

I'm downstream in a breaking library that used compileJSON and trying to figure out how to update/fix my fork.

I'm looking at trying to figure out what to do with

var compile=function(input,optimise,readCallback){
  var result='';
  if(readCallback!==undefined&&compileJSONCallback!==null) {
    result=compileJSONCallback(JSON.stringify(input),optimise,readCallback);
  } else if(typeof input!=='string'&&compileJSONMulti!==null) {
     result=compileJSONMulti(JSON.stringify(input),optimise);
  } else {
    result=compileJSON(input,optimise);
  }
  return JSON.parse(result);
};

from here: line 1576

https://github.com/ericxtang/browser-solc/blob/master/browser-solc.js

Can I get some info on how to fix / update this for the newest versions of solc, so that my in-browser compiler will work again?

related issue: ericxtang/browser-solc#4

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

No branches or pull requests

5 participants