8000 Uncaught RangeError after updating tree-sitter · Issue #22129 · atom/atom · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Uncaught RangeError after updating tree-sitter #22129

Open
1 task done
icecream17 opened this issue Apr 4, 2021 · 6 comments
Open
1 task done

Uncaught RangeError after updating tree-sitter #22129

icecream17 opened this issue Apr 4, 2021 · 6 comments

Comments

@icecream17
Copy link
Contributor
icecream17 commented Apr 4, 2021
Prerequisites

Description

Please see:
Related issue: #23041
Progress: https://github.com/icecream17/atom-update-backlog/blob/main/Languages.md

image

Steps to Reproduce

  1. clone https://github.com/icecream17/language-javascript/tree/operators
  2. apm install
  3. apm link

This issue is actually because of atom/language-javascript#692, not anything to do with the operators pr
So step 1 could also be:

  1. clone https://github.com/atom/language-javascript (upgrade pr is already merged)

And here's an alternative from #23041:

  1. Install language-hclrs@0.0.2
  2. Set language to HCLRS

Expected behavior:

No errors

Actual behavior:

This error

(It also prevents syntax-highlighting)

Reproduces how often:

100%

Versions

atom-beta --version
Atom     : 1.56.0-beta0
Electron : 9.4.4
Chrome   : 83.0.4103.122
Node     : 12.14.1

apm-beta --version
apm  2.5.2
npm  6.14.8
node 12.4.0 x64
atom 1.56.0-beta0
python 3.9.2
git 2.31.1.windows.1
visual studio 2015

OS: Windows 10 x64

Additional Information

After the above picture, there's another error, and then more of the same error (different stack traces but same cause)
image

The latest version of tree-sitter is 0.19.4 0.20.0, but I haven't tested whether updating it would fix the problem

    "text-buffer": "^13.18.5",
    "timecop": "https://www.atom.io/api/packages/timecop/versions/0.36.2/tarball",
    "tree-sitter": "0.17.1",
    "tree-view": "https://www.atom.io/api/packages/tree-view/versions/0.228.2/tarball",
    "typescript-simple": "8.0.6",
@mr-martian
Copy link

I ran into the same issue.

The problem appears to be that tree-sitter ABI 13 (release 0.19.0, commit tree-sitter/tree-sitter@774ae5e, Feb 25 2021) is not backwards compatible with previous versions, so fixing this probably requires either duplicating code by supporting multiple versions at once or requiring that all tree-sitter grammars be recompiled in order to be usable.

@icecream17
Copy link
Contributor Author
icecream17 commented Apr 5, 2021

Reply to previous comment: recompiling all the languages seems harder but also better in the long run.

I made an update progress log: https://github.com/icecream17/atom-update-backlog/blob/main/Languages.md

@icecream17
Copy link
Contributor Author

Hmm, there's no error now (with atom-beta --dev --safe)

@icecream17
Copy link
Contributor Author

Ok, there's no error, but for some reason the old tree-sitter versions are still being used

Parses a?.b as a, ?, ., b
(Supposed to be "a" then "?." then "b")

@icecream17
Copy link
Contributor Author
icecream17 commented Jun 5, 2021

Ok, now the error is back again
image

Actually, maybe the --safe parameter did something to apm link... oops

icecream17 pushed a commit to icecream17/atom that referenced this issue Jun 25, 2022
To make atom-community#386 reviewable,
that pr will be separated into many simpler prs. This is one of them.

This first commit does the following:
- update package.json
- update package-lock.json using `./script/build` which also seems to update `apm/package-lock.json`
- update packages/README.md
- clone all language packages. Specifically:
    - `mkdir packages/language-<all of them>`
    - `cd packages/about`
    - For all languages:
        - `cd ../language-<>`
        - `git clone language-<>`
        - Move all files except `.git` from `language-<>/language-<>`
          to `language-<>`
        - delete `language-<>/language-<>`

Since at first I accidentally updated `dependencies` then
`packageDependencies`, it appears that since the versions of language-c,
language-css, language-go, language-javascript, and language-sass don't
match, `dependencies` was reset for those versions.

[Those repos just happen to be precisely the ones that have tree-sitter v19](https://github.com/icecream17/atom-update-backlog/blob/main/Languages.md), (sans language-sass),
which [currently breaks atom](atom#22129). So even though their repos are now
in `packages`, **I've decided to not use them**.

This is done by updating `packageDependencies` only for non-breaking
languages.
aminya pushed a commit to atom-community/atom that referenced this issue Jul 3, 2022
To make #386 reviewable,
that pr will be separated into many simpler prs. This is one of them.

This first commit does the following:
- update package.json
- update package-lock.json using `./script/build` which also seems to update `apm/package-lock.json`
- update packages/README.md
- clone all language packages. Specifically:
    - `mkdir packages/language-<all of them>`
    - `cd packages/about`
    - For all languages:
        - `cd ../language-<>`
        - `git clone language-<>`
        - Move all files except `.git` from `language-<>/language-<>`
          to `language-<>`
        - delete `language-<>/language-<>`

Since at first I accidentally updated `dependencies` then
`packageDependencies`, it appears that since the versions of language-c,
language-css, language-go, language-javascript, and language-sass don't
match, `dependencies` was reset for those versions.

[Those repos just happen to be precisely the ones that have tree-sitter v19](https://github.com/icecream17/atom-update-backlog/blob/main/Languages.md), (sans language-sass),
which [currently breaks atom](atom#22129). So even though their repos are now
in `packages`, **I've decided to not use them**.

This is done by updating `packageDependencies` only for non-breaking
languages.
aminya pushed a commit to atom-community/atom that referenced this issue Jul 3, 2022
To make #386 reviewable,
that pr will be separated into many simpler prs. This is one of them.

This first commit does the following:
- update package.json
- update package-lock.json using `./script/build` which also seems to update `apm/package-lock.json`
- update packages/README.md
- clone all language packages. Specifically:
    - `mkdir packages/language-<all of them>`
    - `cd packages/about`
    - For all languages:
        - `cd ../language-<>`
        - `git clone language-<>`
        - Move all files except `.git` from `language-<>/language-<>`
          to `language-<>`
        - delete `language-<>/language-<>`

Since at first I accidentally updated `dependencies` then
`packageDependencies`, it appears that since the versions of language-c,
language-css, language-go, language-javascript, and language-sass don't
match, `dependencies` was reset for those versions.

[Those repos just happen to be precisely the ones that have tree-sitter v19](https://github.com/icecream17/atom-update-backlog/blob/main/Languages.md), (sans language-sass),
which [currently breaks atom](atom#22129). So even though their repos are now
in `packages`, **I've decided to not use them**.

This is done by updating `packageDependencies` only for non-breaking
languages.
aminya pushed a commit to atom-community/atom that referenced this issue Jul 9, 2022
To make #386 reviewable,
that pr will be separated into many simpler prs. This is one of them.

This first commit does the following:
- update package.json
- update package-lock.json using `./script/build` which also seems to update `apm/package-lock.json`
- update packages/README.md
- clone all language packages. Specifically:
    - `mkdir packages/language-<all of them>`
    - `cd packages/about`
    - For all languages:
        - `cd ../language-<>`
        - `git clone language-<>`
        - Move all files except `.git` from `language-<>/language-<>`
          to `language-<>`
        - delete `language-<>/language-<>`

Since at first I accidentally updated `dependencies` then
`packageDependencies`, it appears that since the versions of language-c,
language-css, language-go, language-javascript, and language-sass don't
match, `dependencies` was reset for those versions.

[Those repos just happen to be precisely the ones that have tree-sitter v19](https://github.com/icecream17/atom-update-backlog/blob/main/Languages.md), (sans language-sass),
which [currently breaks atom](atom#22129). So even though their repos are now
in `packages`, **I've decided to not use them**.

This is done by updating `packageDependencies` only for non-breaking
languages.
aminya pushed a commit to atom-community/atom that referenced this issue Jul 9, 2022
To make #386 reviewable,
that pr will be separated into many simpler prs. This is one of them.

This first commit does the following:
- update package.json
- update package-lock.json using `./script/build` which also seems to update `apm/package-lock.json`
- update packages/README.md
- clone all language packages. Specifically:
    - `mkdir packages/language-<all of them>`
    - `cd packages/about`
    - For all languages:
        - `cd ../language-<>`
        - `git clone language-<>`
        - Move all files except `.git` from `language-<>/language-<>`
          to `language-<>`
        - delete `language-<>/language-<>`

Since at first I accidentally updated `dependencies` then
`packageDependencies`, it appears that since the versions of language-c,
language-css, language-go, language-javascript, and language-sass don't
match, `dependencies` was reset for those versions.

[Those repos just happen to be precisely the ones that have tree-sitter v19](https://github.com/icecream17/atom-update-backlog/blob/main/Languages.md), (sans language-sass),
which [currently breaks atom](atom#22129). So even though their repos are now
in `packages`, **I've decided to not use them**.

This is done by updating `packageDependencies` only for non-breaking
languages.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants
@sadick254 @mr-martian @darangi @icecream17 and others
0