Skip to content

Empty array literal doesn't work (in general, need better error messages) #663

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
trusktr opened this issue Jun 13, 2019 · 2 comments
Closed

Comments

@trusktr
Copy link
Member

trusktr commented Jun 13, 2019

I know, error messages are still WIP. AS is an awesome project!

I ran into this: https://github.com/jtenner/as-pect/issues/92 (see the reproduction there).

I didn't know if it was an as-pect issue or an assemblyscript issue, because there wasn't a meaningful error message.

It ended up being that on line 18 of src/as/glas/core/Object3D.spec.ts (in the reproduction of the linked issue) I needed to change

const names: string[] = []

to

const names: string[] = new Array()

I'm loving AssemblyScript, but my biggest hurdle so far is error messages that aren't telling me much (as an end-user). Because of this I may be posting issues on GitHub that are actually my fault, for example perhaps I'm trying to use an unsupported feature, but I don't know that it isn't supported.

It'll be nice once the error messages are meaningful.

If it weren't for @willemneal in https://github.com/jtenner/as-pect/issues/92#issuecomment-501709576, I may have been a looooong time before I figured it out what was happening (being a TS/JS user coming over with no experience in Wasm).

@MaxGraey
Copy link
Member

This issue with empty array literal should be already fixed in AS master. I guess as-pect still use old runtime.

cc @jtenner

@trusktr
Copy link
Member Author

trusktr commented Jun 13, 2019

Ah cool. I left my self a TODO to change my code back and test it later. I'll close this out then.

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

No branches or pull requests

2 participants