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

Generate compiler api in TypeScript using autorest #1456

Merged
merged 3 commits into from
Apr 22, 2022

Conversation

davidyuk
Copy link
Member

@davidyuk davidyuk commented Apr 1, 2022

validateBytecode,
...otherOptions
} = {}) {
if (!_aci && source) {
_aci = await this.compilerApi.generateACI({ code: source, options: { filesystem } })
_aci = await this.compilerApi.generateACI({ code: source, options: { fileSystem } })
Copy link
Member Author

Choose a reason for hiding this comment

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

for some reason sdk and aesophia_http names this option differently

@Kalovelo
Copy link
Collaborator

Apart from the need of rebasing, I think it looks great!

I could also suggest updating the testing docs so contributors know that they need to run build:api before running tests. Or, we could create a new npm command which would build the api if it is not already built. We could then append this command in the test command, like

"test": "checkApi && nyc mocha './test/unit/' './test/integration/'",

Finally, since api folder is auto-generated through an npm command, we could consider adding it in .gitignore

BREAKING CHANGE: `filesystem` option renamed to `fileSystem`

BREAKING CHANGE: methods of `compilerApi` requires `options` object according to their specification

BREAKING CHANGE: methods of `compilerApi` returns and accepts keys named in camelCase
instead of snake_case
BREAKING CHANGE: `ContractCompilerHttp` creates and changes compiler URL in sync
Don't tread `ContractCompilerHttp(...)` and `compiler.setCompilerUrl(...)` as a `Promise` anymore.

BREAKING CHANGE: `ContractCompilerHttp` doesn't check version on creating and switching the url
This would be checked before the first request.
@davidyuk davidyuk merged commit aee822d into develop Apr 22, 2022
@davidyuk davidyuk deleted the feature/ts-compiler-api branch April 22, 2022 14:37
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.

2 participants