Skip to content

Name clash demo #20

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

Closed
wants to merge 73 commits into from
Closed

Name clash demo #20

wants to merge 73 commits into from

Conversation

vgrichina
Copy link

_ prefix indicated private method.
BSON bindings generation for NEAR
 Implement nested objects support
Add diff to ./test.sh based on snapshots of output
@vgrichina
Copy link
Author

To reproduce run ./test.sh in tests/near-bindgen

@dcodeIO
Copy link

dcodeIO commented Feb 21, 2019

./test.sh fails with ERROR: Import file 'json/encoder.ts' not found. for me. Anything I need to set up first?

@MaxGraey
Copy link

MaxGraey commented Feb 21, 2019

@vgrichina It hard to investigate to this issue with bunch of generated code. It will be great if you reproduce this with minimal example ideally already pregenerated and compiled with original assemblyscript (without near-bindgen)

@vgrichina
Copy link
Author

./test.sh fails with ERROR: Import file 'json/encoder.ts' not found. for me. Anything I need to set up first?

@dcodeIO npm install in root should likely help

@vgrichina
Copy link
Author

@MaxGraey did you try to have class with same name in 2 modules (one of them including another)?
Do you have example of that which compiles without problem?

@dcodeIO
Copy link

dcodeIO commented Feb 22, 2019

Yeah, tried npm install, but seems it still can't find the assemblyscript-json module. Is that on npm or so actually?

@vgrichina
Copy link
Author

@dcodeIO it's on GitHub.

Am I doing package.json wrong?
"assemblyscript-json": "github:nearprotocol/assemblyscript-json",

@dcodeIO
Copy link

dcodeIO commented Feb 22, 2019

Doesn't seem so, it's actually in node_modules. The exact error I see is:

$ ./test.sh
+ BASEDIR=../..
+ ../../bin/asc model.ts --nearFile model_near.ts
+ ../../bin/asc main.ts --nearFile main_near.ts
ERROR: Import file 'json/encoder.ts' not found.
    at parseBacklog (xyz\assemblyscript\cli\asc.js:355:25)

@vgrichina
Copy link
Author

@dcodeIO I guess symlinks don't work in Git?
I have symlink pointing json -> ../../node_modules/assemblyscript-json/assembly

@dcodeIO
Copy link

dcodeIO commented Feb 22, 2019

That might be the issue, I'm on Windows

@vgrichina
Copy link
Author

@dcodeIO got it, then it should be enough just to copy files from ../../node_modules/assemblyscript-json/assembly folder to json folder.

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