graphprotocol / graphprotocol/graph-node

Synchronize AssemblyScript versions between packages

Open
#6,044 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/runtime area/ts enhancement
Dominant language
Rust
Stars
3.2k
Forks
1.1k
Avg merge
4d 1h
Merged PRs (30d)
1

Description

Description

Environment

  • @graphprotocol/graph-cli v0.97.1, which uses assemblyscript v0.19.23
  • @graphprotocol/graph-ts v0.38.1, which uses assemblyscript v0.27.31

Problem

keywords: assemblyscript, equality, string checks, string comparison, null check, ==, ===, !=, !==

In previous versions of graph-ts, we were able to perform null checks using ==. But now, in the latest versions, we are forced to use === (otherwise, we get all sorts of errors at build time).

I wouldn't have a problem with using ===, but we are also forced to use == for string comparisons.

This is a super error-prone design where the maintainers have to remember to use slightly different operators for different types.

Solution

Upgrade to AssemblyScript v0.20, in which the === operator no longer checks for strict object equality.

https://github.com/AssemblyScript/assemblyscript/issues/621

Are you aware of any blockers that must be resolved before implementing this feature? If so, which? Link to any relevant GitHub issues.

No response

Some information to help us out
  • Tick this box if you plan on implementing this feature yourself.
  • I have searched the issue tracker to make sure this issue is not a duplicate.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the AssemblyScript dependency declarations for @graphprotocol/graph-cli and @graphprotocol/graph-ts, starting with the package metadata and build configuration for each package. Confirm the required AssemblyScript upgrade is compatible with both packages and validate that null checks and string comparisons build successfully; done means both packages use the synchronized version.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.