Title: Design Meeting Notes, 6/14/2023 · Issue #54646 · microsoft/TypeScript · GitHub
Open Graph Title: Design Meeting Notes, 6/14/2023 · Issue #54646 · microsoft/TypeScript
X Title: Design Meeting Notes, 6/14/2023 · Issue #54646 · microsoft/TypeScript
Description: Watch Factory Plugins #54012 What's the motivation for these? Editors and tools like VS Code have good file-watchers, often which can be shared between other language services. This would fix a lot of TypeScript's file-watching reliabili...
Open Graph Description: Watch Factory Plugins #54012 What's the motivation for these? Editors and tools like VS Code have good file-watchers, often which can be shared between other language services. This would fix a lot...
X Description: Watch Factory Plugins #54012 What's the motivation for these? Editors and tools like VS Code have good file-watchers, often which can be shared between other language services. This would fix a...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/54646
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 6/14/2023","articleBody":"# Watch Factory Plugins\r\n\r\nhttps://github.com/microsoft/TypeScript/pull/54012\r\n\r\n* What's the motivation for these?\r\n* Editors and tools like VS Code have good file-watchers, often which can be shared between other language services.\r\n * This would fix a lot of TypeScript's file-watching reliability issues, avoid creating file-watchers within the TypeScript process itself, and would avoid exhausting OS resources for file-watching (usually on Linux).\r\n* Main question in the last few meetings was \"do we want this in `compilerOptions` or `watchOptions`?\r\n * Could be its own thing that's parallel to `compilerOptions` - but that makes the API surface area.\r\n * One thought would be to put it in the `plugins` array - which \r\n* The biggest motivator is editing scenarios - is a plugin model overkill?\r\n * All the recent discourse on plugins has put pressure on \r\n * Can see a version that fits on TSServer but not on tsc.\r\n* There are frequent issues filed on us based on file-watching - ask us to use a separate file-watcher, often provided by a daemon watcher process.\r\n* Different options to solve the problem:\r\n * Write our own file watcher - we're doing this today but it's definitely not the best.\r\n * Let someone else plug in the file-watching.\r\n * Use someone else's file-watcher.\r\n * Peer dependency?\r\n * Vendoring?\r\n* What does it mean to do custom file-watching only for TSServer?\r\n * Events via TSServer messages - LSP requires this anyway, \"friendlier\" for a lot of editors.\r\n * But probably more involved.\r\n * Current approach - roughly either via plugin model or something specific.\r\n* Really two problems\r\n * Inaccurate file watcher\r\n * We believe a lot of the issues do come from the built-in watchers in Node.js - they may be due to platform-specific quirks, but it is tough.\r\n * Duplication of efforts in file-watching\r\n * Cannot solve this via quality.\r\n* Revisiting the LSP-ish approach\r\n * It will be involved, but one day we may end up doing LSP anyway.\r\n * What would work best for web-based editors such as vscode.dev?\r\n * Editor ends up being the source of truth, ends up \r\n* Why can't editors just use... `tsserverlibrary.js` instead of `tsserver.js`?\r\n * Can customize all of this to one's heart's content.\r\n * Well one has to copy/paste a bunch of code for the Node.js implementation that runs `tsserver.js`\r\n* None of this works if you're using an editor that's not written in JS nor has its own file watcher.\r\n * Neither plugins nor using our API directly.\r\n * The LSP approach here has the upper hand.\r\n* We are leaning away from the concept of watch plugins, and towards file watching events raised in TSServer sessions. We believe that it would address the most common issues that users hit, reduce resource consumption, and make it easier to eventually adopt LSP.","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2023-06-14T21:56:44Z","url":"https://github.com/microsoft/TypeScript/issues/54646"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9b182d7d-d55f-20f3-7688-81f0ad1a69fe |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D106:ADA9D:F1E427:139416A:6B00FEEB |
| html-safe-nonce | 57d848ceb7354eae97c6084db16744693c1295d530b1ec8174e9624d0601ac70 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTA2OkFEQTlEOkYxRTQyNzoxMzk0MTZBOjZCMDBGRUVCIiwidmlzaXRvcl9pZCI6IjQwMDk5MTg4OTk3MDQzNjQ3NzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9cc1a2f4b74549c5fe12eb04ab50f6bb42731509b188c4e30933b57b380ae9f3 |
| hovercard-subject-tag | issue:1757703534 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/54646/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1dccf224354ba4e8eaa655ae07c7ddb70aaa24dc381d13abf225b7a7b14719f8/microsoft/TypeScript/issues/54646 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1dccf224354ba4e8eaa655ae07c7ddb70aaa24dc381d13abf225b7a7b14719f8/microsoft/TypeScript/issues/54646 |
| og:image:alt | Watch Factory Plugins #54012 What's the motivation for these? Editors and tools like VS Code have good file-watchers, often which can be shared between other language services. This would fix a lot... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DanielRosenwasser |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width