-
Notifications
You must be signed in to change notification settings - Fork 1k
Update AssemblyScript to 0.19.2 #2571
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
Conversation
c9d4162
to
b02cac8
Compare
b8496ce
to
e13ca01
Compare
b8440a3
to
207d0f5
Compare
f100d50
to
9ecb156
Compare
This had to be done for now because the size_of is being called on AscPtr::read_ptr using the whole structure containing both versions, so the size is bigger.
Now we pass a flag (--explicitStart) to `asc` (AssemblyScript compiler) for it to export the `_start` funcion for us to call it manually. This is being done so the host-exports work properly.
…api version 0.0.5)
e3bc271
to
7f29b82
Compare
@@ -1,7 +1,9 @@ | |||
import { Trigger } from "../generated/Contract/Contract"; | |||
import { Address, BigDecimal, BigInt, ethereum } from "@graphprotocol/graph-ts"; | |||
|
|||
// Test that host exports work in globals. | |||
// TODO: remove this, graph-ts should guarantee this | |||
__alloc(0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this TODO be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this should be removed 😅
I'll remove both TODO and __alloc
.
The __alloc
should be called by my graph-ts
branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed!
Lets just squash the commits when merging |
…check of apiVersion 0.0.4
// Sanity check | ||
match &api_version { | ||
api_version if *api_version <= Version::new(0, 0, 4) => { | ||
// This was using an double equal sign before instead of less than. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leoyvens here's the final comment I've talked about
This PR allows subgraph developers to use AssemblyScript on version
0.19.2
. To enable the feature, they must change theirsubgraph.yaml
'sapiVersion
to a version greater than or equal to0.0.5
. The behavior for the current deployed subgraphs shouldn't change at all.Before this is merged, we need to release a new version of both
graph-ts
andgraph-cli
, so we can point to them in theintegration-tests
, for now they're using these PRs branches:Important changes: