René's URL Explorer Experiment


Title: Circular declarations cause infinite loops in getExportInfos since v5.5 · Issue #59201 · microsoft/TypeScript · GitHub

Open Graph Title: Circular declarations cause infinite loops in getExportInfos since v5.5 · Issue #59201 · microsoft/TypeScript

X Title: Circular declarations cause infinite loops in getExportInfos since v5.5 · Issue #59201 · microsoft/TypeScript

Description: 🔎 Search Terms infinite loop, circular, infinite loop, getExportInfos, invalid array length 🕗 Version & Regression Information This is an infinite loop in tsserver, eventually leading to a crash due to creating an infinitely sized array....

Open Graph Description: 🔎 Search Terms infinite loop, circular, infinite loop, getExportInfos, invalid array length 🕗 Version & Regression Information This is an infinite loop in tsserver, eventually leading to a crash du...

X Description: 🔎 Search Terms infinite loop, circular, infinite loop, getExportInfos, invalid array length 🕗 Version & Regression Information This is an infinite loop in tsserver, eventually leading to a cras...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/59201

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Circular declarations cause infinite loops in getExportInfos since v5.5","articleBody":"### 🔎 Search Terms\n\ninfinite loop, circular, infinite loop, getExportInfos, invalid array length\n\n### 🕗 Version \u0026 Regression Information\n\n- This is an infinite loop in tsserver, eventually leading to a crash due to creating an infinitely sized array.\r\n- This changed between versions 5.5.0-dev.20240508 and 5.5.0-dev.20240509\r\n- Probably this pr: #58460 \r\n\n\n### ⏯ Playground Link\n\nDoes not reproduce on playground\n\n### 💻 Code\n\nIn an empty folder, place this code in `types.d.ts`\r\n```ts\r\ndeclare module \"mymod\" {\r\n  import mymod from \"mymod\";\r\n  export default mymod;\r\n}\r\n```\r\n\r\nIn another file `index.ts`, trigger an autocomplete or getCodeFixes. Typing two characters into an empty file will usually work. It will hang.\r\n\n\n### 🙁 Actual behavior\n\nThe LSP server go into an infinite loop and hangs. After about 20 seconds it'll throw because an array gets too big.\r\n\r\nThe server log contains:\r\n\r\n```\r\n    RangeError: Invalid array length\r\n        at Array.push (\u003canonymous\u003e)\r\n        at append (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:2822:6)\r\n        at forEachNameOfDefaultExport (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:138888:13)\r\n        at /Users/myusername/mweb/node_modules/typescript/lib/typescript.js:155493:115\r\n        at /Users/myusername/mweb/node_modules/typescript/lib/typescript.js:138720:119\r\n        at forEachExternalModule (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:138763:7)\r\n        at forEachExternalModuleToImportFrom (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:138720:3)\r\n        at getExportInfos (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:155488:3)\r\n        at /Users/myusername/mweb/node_modules/typescript/lib/typescript.js:155424:24\r\n        at flatMap (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:2502:17)\r\n        at getFixesInfoForNonUMDImport (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:155418:10)\r\n        at getFixInfos (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:155254:12)\r\n        at Object.getCodeActions (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:154389:18)\r\n        at /Users/myusername/mweb/node_modules/typescript/lib/typescript.js:151448:46\r\n        at flatMap (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:2502:17)\r\n        at Object.getFixes (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:151448:10)\r\n        at /Users/myusername/mweb/node_modules/typescript/lib/typescript.js:149730:33\r\n        at flatMap (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:2502:17)\r\n        at Object.getCodeFixesAtPosition (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:149728:12)\r\n        at IpcIOSession.getCodeFixes (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:191339:50)\r\n        at getCodeFixes (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:189374:43)\r\n        at /Users/myusername/mweb/node_modules/typescript/lib/typescript.js:191661:15\r\n        at IpcIOSession.executeWithRequestId (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:191650:14)\r\n        at IpcIOSession.executeCommand (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:191659:29)\r\n        at IpcIOSession.onMessage (/Users/myusername/mweb/node_modules/typescript/lib/typescript.js:191707:68)\r\n        at process.\u003canonymous\u003e (/Users/myusername/mweb/node_modules/typescript/lib/tsserver.js:525:14)\r\n        at process.emit (node:events:514:28)\r\n        at emit (node:internal/child_process:951:14)\r\n        at process.processTicksAndRejections (node:internal/process/task_queues:83:21)\r\n```\r\n\r\n\u003cimg width=\"1800\" alt=\"Screenshot 2024-07-09 at 10 06 41 PM\" src=\"https://github.com/microsoft/TypeScript/assets/4035267/5f7808ad-860c-46b6-8e55-fe4e68093c12\"\u003e\r\n\n\n### 🙂 Expected behavior\n\nNothing should happen.\n\n### Additional information about the issue\n\n_No response_","author":{"url":"https://github.com/simon-paris","@type":"Person","name":"simon-paris"},"datePublished":"2024-07-09T15:16:37.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/59201/TypeScript/issues/59201"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:943a11ec-07d4-6383-d772-175e02604639
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD2FC:1279C0:12A6ED0:19AD712:6A61B500
html-safe-nonce3a79147eeb9fe78f03650a47da119aeadcbf9d34042f3cebb3f0702d1fdf78b7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkZDOjEyNzlDMDoxMkE2RUQwOjE5QUQ3MTI6NkE2MUI1MDAiLCJ2aXNpdG9yX2lkIjoiNjMxNTYyODgyOTM0NTk1MzAyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac8531f38c9b814f792f8bb78d6340efe976a9ca388c5f1a71fc9a5bbddb4d8911
hovercard-subject-tagissue:2398494700
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/59201/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3d75352ab0bc4c75726170d74d5f43729fd9ffe6c68dc0ae3dd8849a20e0e363/microsoft/TypeScript/issues/59201
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3d75352ab0bc4c75726170d74d5f43729fd9ffe6c68dc0ae3dd8849a20e0e363/microsoft/TypeScript/issues/59201
og:image:alt🔎 Search Terms infinite loop, circular, infinite loop, getExportInfos, invalid array length 🕗 Version & Regression Information This is an infinite loop in tsserver, eventually leading to a crash du...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesimon-paris
hostnamegithub.com
expected-hostnamegithub.com
None6f4633bcf01c1ad14b73fd07dd39ac31d61f3d3c2578ee08ec1792b7b351eeb9
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseac296ae7f21856f1f92adbad22f870b6fbb4b907
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/59201#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F59201
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F59201
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/59201
Reloadhttps://github.com/microsoft/TypeScript/issues/59201
Reloadhttps://github.com/microsoft/TypeScript/issues/59201
Please reload this pagehttps://github.com/microsoft/TypeScript/issues/59201
microsoft https://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Notifications https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Fork 13.6k https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Star 110k https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Code https://github.com/microsoft/TypeScript
Issues 5k+ https://github.com/microsoft/TypeScript/issues
Pull requests 21 https://github.com/microsoft/TypeScript/pulls
Actions https://github.com/microsoft/TypeScript/actions
Projects https://github.com/microsoft/TypeScript/projects
Models https://github.com/microsoft/TypeScript/models
Wiki https://github.com/microsoft/TypeScript/wiki
Security and quality 0 https://github.com/microsoft/TypeScript/security
Insights https://github.com/microsoft/TypeScript/pulse
Code https://github.com/microsoft/TypeScript
Issues https://github.com/microsoft/TypeScript/issues
Pull requests https://github.com/microsoft/TypeScript/pulls
Actions https://github.com/microsoft/TypeScript/actions
Projects https://github.com/microsoft/TypeScript/projects
Models https://github.com/microsoft/TypeScript/models
Wiki https://github.com/microsoft/TypeScript/wiki
Security and quality https://github.com/microsoft/TypeScript/security
Insights https://github.com/microsoft/TypeScript/pulse
#59215https://github.com/microsoft/TypeScript/pull/59215
Circular declarations cause infinite loops in getExportInfos since v5.5https://github.com/microsoft/TypeScript/issues/59201#top
#59215https://github.com/microsoft/TypeScript/pull/59215
https://github.com/andrewbranch
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
CrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Crash%22
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
TypeScript 5.5.4https://github.com/microsoft/TypeScript/milestone/205
https://github.com/simon-paris
simon-parishttps://github.com/simon-paris
on Jul 9, 2024https://github.com/microsoft/TypeScript/issues/59201#issue-2398494700
Refactor default export info name gathering #58460https://github.com/microsoft/TypeScript/pull/58460
https://private-user-images.githubusercontent.com/4035267/347012466-5f7808ad-860c-46b6-8e55-fe4e68093c12.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODQ3ODg1MjQsIm5iZiI6MTc4NDc4ODIyNCwicGF0aCI6Ii80MDM1MjY3LzM0NzAxMjQ2Ni01Zjc4MDhhZC04NjBjLTQ2YjYtOGU1NS1mZTRlNjgwOTNjMTIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDcyMyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA3MjNUMDYzMDI0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODBhZWExNTAwNmFiMGIxZjE2ZDMyNzU4YTg1YjhmOTYxYjRlNjk0NDdmMjdiZWJkNzVmMzcwMjAzNmY0ZmQyZSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.rU9BpYe-RGZ1IFgdzctZmZnjmY7QVuLbwxgLt5Hmizg
andrewbranchhttps://github.com/andrewbranch
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
CrashFor flagging bugs which are compiler or service crashes or unclean exits, rather than bad outputhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Crash%22
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
TypeScript 5.5.4https://github.com/microsoft/TypeScript/milestone/205
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.