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

Remove iterator API. Remove TopN. Remove values API from PersistentMap #7

Merged
merged 5 commits into from
Mar 18, 2020

Conversation

MaksymZavershynskyi
Copy link
Contributor

@MaksymZavershynskyi MaksymZavershynskyi commented Mar 13, 2020

Reviving this old PR: nearprotocol/near-runtime-ts#99

@willemneal CI fails because of the injected code:

--baseDir /home/runner/work/near-sdk-as/near-sdk-as/bindgen --runtime none --transform /home/runner/work/near-sdk-as/near-sdk-as/bindgen ../assembly/__tests__/bindgen/test.ts --binaryFile out/test.wasm --textFile out/test.wat --debug --measure --runPasses inlining-optimizing,dce
INFO AS210: Expression is never 'null'.

     let encoder = (_encoder == null ? new JSONEncoder() : _encoder)!;
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 in ../assembly/__tests__/bindgen/model.ts(54,18)

INFO AS210: Expression is never 'null'.

     let encoder = (_encoder == null ? new JSONEncoder() : _encoder)!;
                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@willemneal
Copy link
Contributor

Above is just a warning and I'll fix it in the next major version.

However, the error was the following

[Error] There was a compilation error when trying to create the wasm binary for file: assembly/__tests__/runtime.spec.ts.
Error [AssertionError]: assertion failed
    at t.assert (/home/runner/work/near-sdk-as/near-sdk-as/node_modules/assemblyscript/dist/assemblyscript.js:7:576726)
    at m.compileAssignment (/home/runner/work/near-sdk-as/near-sdk-as/node_modules/assemblyscript/dist/assemblyscript.js:7:283111)
    at m.compileBinaryExpression (/home/runner/work/near-sdk-as/near-sdk-as/node_modules/assemblyscript/dist/assemblyscript.js:7:261304)
    at m.compileExpression (/home/runner/work/near-sdk-as/near-sdk-as/node_modules/assemblyscript/dist/assemblyscript.js:7:248552)
    at m.compileExpressionStatement (/home/runner/work/near-sdk-as/near-sdk-as/node_modules/assemblyscript/dist/assemblyscript.js:7:236513)
    at m.compileStatement (/home/runner/work/near-sdk-as/near-sdk-as/node_modules/assemblyscript/dist/assemblyscript.js:7:232366)
    at m.compileStatements (/home/runner/work/near-sdk-as/near-sdk-as/node_modules/assemblyscript/dist/assemblyscript.js:7:233373)
    at m.compileFunctionBody (/home/runner/work/near-sdk-as/near-sdk-as/node_modules/assemblyscript/dist/assemblyscript.js:7:222983)
    at m.compileFunction (/home/runner/work/near-sdk-as/near-sdk-as/node_modules/assemblyscript/dist/assemblyscript.js:7:221953)
    at m.compileFunctionExpression (/home/runner/work/near-sdk-as/near-sdk-as/node_modules/assemblyscript/dist/assemblyscript.js:7:309419) {
  message: 'assertion failed'

I really hate these compiler errors; I will take a look soon and make an issue upstream if I can.

@MaksymZavershynskyi
Copy link
Contributor Author

[Error] There was a compilation error when trying to create the wasm binary for file: assembly/tests/runtime.spec.ts.

@willemneal can you tell what causes this error? Cause I just removed some of the tests and I am not sure why is it not compiling anymore.

@willemneal
Copy link
Contributor

You forgot to update runtime.spec.ts, which should have been in the runtime folder.

@MaksymZavershynskyi
Copy link
Contributor Author

@willemneal Thank you for fixing it! Is it good to merge?

@willemneal willemneal added this to the v1.0.0 milestone Mar 18, 2020
@willemneal willemneal merged commit 4702cbf into master Mar 18, 2020
@willemneal willemneal mentioned this pull request Mar 18, 2020
@mehtaphysical mehtaphysical deleted the no_iterator branch June 9, 2021 13:38
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.

2 participants