René's URL Explorer Experiment


Title: LanguageServerHost fileExists / readFile no longer optional? · Issue #18753 · microsoft/TypeScript · GitHub

Open Graph Title: LanguageServerHost fileExists / readFile no longer optional? · Issue #18753 · microsoft/TypeScript

X Title: LanguageServerHost fileExists / readFile no longer optional? · Issue #18753 · microsoft/TypeScript

Description: TypeScript Version: 2.4.2, also in master This issue was encountered when upgrading javascript-typescript-langserver from typescript 2.3.4 (see sourcegraph/javascript-typescript-langserver#356) Code When implementing a LanguageServiceHos...

Open Graph Description: TypeScript Version: 2.4.2, also in master This issue was encountered when upgrading javascript-typescript-langserver from typescript 2.3.4 (see sourcegraph/javascript-typescript-langserver#356) Cod...

X Description: TypeScript Version: 2.4.2, also in master This issue was encountered when upgrading javascript-typescript-langserver from typescript 2.3.4 (see sourcegraph/javascript-typescript-langserver#356) Cod...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"LanguageServerHost fileExists / readFile no longer optional?","articleBody":"\u003c!-- BUGS: Please use this template. -->\r\n\u003c!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->\r\n\u003c!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->\r\n\r\n**TypeScript Version:**  2.4.2, also in master\r\n\r\nThis issue was encountered when upgrading javascript-typescript-langserver from typescript 2.3.4 (see https://github.com/sourcegraph/javascript-typescript-langserver/pull/356)\r\n\r\n**Code**\r\n\r\nWhen implementing a LanguageServiceHost without implementing optional `fileExists` or `readFile`, the compilerHost instance silently skips `import` statements:\r\n```ts\r\nexport class InMemoryLanguageServiceHost implements ts.LanguageServiceHost {\r\n  // only required members implemented here..\r\n}\r\n```\r\n\r\nThe above implementation compiled without errors against 2.4.2, but all `import` statements in source files added to the language server failed to resolve, resulting in diagnostics, missing definitions, completions, etc.\r\n\r\n**Expected behavior:**\r\n\r\nEither:\r\n* Compilation failure indicating that LanguageServiceHost is now incomplete\r\n* Module resolver falls back to ModuleResolutionHost to access `fileExists` / `readFile`\r\n\r\n**Actual behavior:**\r\n\r\nImports fail to resolve where they do exist, in `nodeModuleResolverWorker`, following the path:\r\n\r\n```\r\nnodeLoadModuleByRelativeName -> loadModuleFromFile\r\nloadModuleFromFile ->  tryExtension -> tryFile -> state.host.fileExists\r\n```\r\n\r\nDebugger screenshot showing the issue at runtime at https://github.com/Microsoft/TypeScript/blob/21bbdd33c51f07a46663e9b50fff62e9c007c806/src/services/services.ts#L1166\r\n\r\n\u003cimg width=\"983\" alt=\"screen shot 2017-09-25 at 19 37 12\" src=\"https://user-images.githubusercontent.com/4395832/30823982-65bae216-a22e-11e7-9a91-399150e11949.png\">\r\n\r\nThe typings published at https://github.com/Microsoft/TypeScript/blob/master/lib/typescript.d.ts#L3764-L3765 show that the two members are still optional.\r\n\r\nThis dependency appears to have been introduced at: https://github.com/Microsoft/TypeScript/commit/2ec92b9c02ba6ac6b97d3fb5af830d0ece6dcd92","author":{"url":"https://github.com/tomv564","@type":"Person","name":"tomv564"},"datePublished":"2017-09-25T18:41:16Z","url":"https://github.com/microsoft/TypeScript/issues/18753"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d2be1f96-2b6a-d0d2-48f5-3d298659a5e9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id887A:317608:CCEAD3:104F3E5:6B00FF09
html-safe-nonce676c61a852129ca2d5440e2d311f6b0d52da0d8d362d554cab093f446599898f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODdBOjMxNzYwODpDQ0VBRDM6MTA0RjNFNTo2QjAwRkYwOSIsInZpc2l0b3JfaWQiOiIyMDQyMjkxNjI3NTg2MzUyNzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac186f4a44f57fc507040579109c0c7db97236bb5c79c63ccd82ca663f2b69d271
hovercard-subject-tagissue:260375457
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/18753/issue_layout
twitter:imagehttps://opengraph.githubassets.com/80a3e4f3113231a3b2dd3862918f791951210ec877a2cc2b5b4b690d4493fa74/microsoft/TypeScript/issues/18753
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/80a3e4f3113231a3b2dd3862918f791951210ec877a2cc2b5b4b690d4493fa74/microsoft/TypeScript/issues/18753
og:image:altTypeScript Version: 2.4.2, also in master This issue was encountered when upgrading javascript-typescript-langserver from typescript 2.3.4 (see sourcegraph/javascript-typescript-langserver#356) Cod...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametomv564
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
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
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/18753#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F18753
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F18753
Sign uphttps://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/18753
Reloadhttps://github.com/microsoft/TypeScript/issues/18753
Reloadhttps://github.com/microsoft/TypeScript/issues/18753
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests309 (309)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/18753
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/18753
LanguageServerHost fileExists / readFile no longer optional?https://github.com/microsoft/TypeScript/issues/18753#top
DuplicateAn existing issue was already createdhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Duplicate%22
https://github.com/tomv564
Tom van Ommeren (tomv564)https://github.com/tomv564
on Sep 25, 2017https://github.com/microsoft/TypeScript/issues/18753#issue-260375457
sourcegraph/javascript-typescript-langserver#356https://github.com/sourcegraph/javascript-typescript-langserver/pull/356
https://github.com/Microsoft/TypeScript/blob/21bbdd33c51f07a46663e9b50fff62e9c007c806/src/services/services.ts#L1166https://github.com/Microsoft/TypeScript/blob/21bbdd33c51f07a46663e9b50fff62e9c007c806/src/services/services.ts#L1166
https://user-images.githubusercontent.com/4395832/30823982-65bae216-a22e-11e7-9a91-399150e11949.png
https://github.com/Microsoft/TypeScript/blob/master/lib/typescript.d.ts#L3764-L3765https://github.com/Microsoft/TypeScript/blob/master/lib/typescript.d.ts#L3764-L3765
2ec92b9https://github.com/microsoft/TypeScript/commit/2ec92b9c02ba6ac6b97d3fb5af830d0ece6dcd92
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Sep 25, 2017https://github.com/microsoft/TypeScript/issues/18753#event-1264334940
https://github.com/mhegazy
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Sep 25, 2017https://github.com/microsoft/TypeScript/issues/18753#issuecomment-331978983
Andy (Andrewkraft) (@Andy-MS)https://github.com/Andy-MS
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
Domain: APIRelates to the public API for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20API%22
on Sep 25, 2017https://github.com/microsoft/TypeScript/issues/18753#event-1264335259
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on Sep 25, 2017https://github.com/microsoft/TypeScript/issues/18753#issuecomment-331979446
#16616https://github.com/microsoft/TypeScript/issues/16616
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
DuplicateAn existing issue was already createdhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Duplicate%22
Domain: APIRelates to the public API for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20API%22
on Sep 25, 2017https://github.com/microsoft/TypeScript/issues/18753#event-1264340626
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
on Sep 25, 2017https://github.com/microsoft/TypeScript/issues/18753#event-1264340690
https://github.com/tomv564
Tom van Ommeren (tomv564)https://github.com/tomv564
on Sep 25, 2017https://github.com/microsoft/TypeScript/issues/18753#issuecomment-331984267
Tom van Ommeren (tomv564)https://github.com/tomv564
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Sep 25, 2017https://github.com/microsoft/TypeScript/issues/18753#event-1264367983
microsofthttps://github.com/microsoft
on Jun 14, 2018https://github.com/microsoft/TypeScript/issues/18753#event-1682125516
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/18753
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/18753
DuplicateAn existing issue was already createdhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Duplicate%22
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.