microsoft / microsoft/TypeScript

Maximum call stack size exceeded

Ouverte
#62,218 3 commentaires 2 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Domain: API Needs More Info
Langage dominant
Go
Étoiles
111k
Forks
14.3k
Merge moyen
2 j 4 h
PR mergées (30 j)
132

Description

### 🔎 Search Terms

call stack exceeded

### 🕗 Version & Regression Information

- This changed between versions `5.8.3` and `5.9.2`
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______

### ⏯ Playground Link

_No response_

### 💻 Code

```ts
// Your code here
```

### 🙁 Actual behavior

We noticed that there's a potential regression between the versions `5.8.3` and `5.9.2`.

When allowing Dependabot to bump from `5.8.3` to `5.9.2`, we started seeing the `yarn astro check` command failing with the following output:
```
🤟 ~/Sites/[project] (dependabot/npm_and_yarn/dev/typescript-5.9.2): yarn astro check
19:42:18 [content] Syncing content
19:42:18 [content] Synced content
19:42:18 [types] Generated 103ms
19:42:18 [check] Getting diagnostics for Astro files in project...
Maximum call stack size exceeded
Location:
[project]/node_modules/typescript/lib/typescript.js:3371:46
Stack trace:
at String.replace ()
at getCanonicalFileName ([project]/node_modules/typescript/lib/typescript.js:129084:17)
at toPath3 ([project]/node_modules/typescript/lib/typescript.js:127606:12)
at findSourceFile ([project]/node_modules/typescript/lib/typescript.js:128749:20)
at findSourceFile ([project]/node_modules/typescript/lib/typescript.js:128749:20)
```

### 🙂 Expected behavior

I would expect the `yarn astro check` command to succeed with hopefully no type issues since nothing else was changed in the PR other than the version being bumped.

### Additional information about the issue

_No response_

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par reproduire l’échec avec TypeScript 5.8.3 et 5.9.2 en utilisant la commande signalée `yarn astro check`. Examinez les emplacements de la stack trace dans `node_modules/typescript/lib/typescript.js`, en particulier `getCanonicalFileName`, `toPath3` et `findSourceFile` ; c’est terminé lorsque la régression est identifiée et que le check s’achève sans erreur de maximum call stack.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
typescript
Domaine
compilers
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.