summaryrefslogtreecommitdiff
path: root/cli/lsp
AgeCommit message (Collapse)Author
2024-05-01chore(lsp): revert import map pre-resolution for jsxImportSource (#23619)Nayeem Rahman
2024-04-30feat(cli): add support for jsxImportSourceTypes (#23419)Luca Casonato
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-04-30docs: fix some typos in comments (#23520)findmyhappy
2024-04-30refactor(lsp): move fields from Documents to LspResolver (#23585)Nayeem Rahman
2024-04-29FUTURE: remove import assertions support for JavaScript (#23541)Kenta Moriuchi
Ref #17944, https://github.com/swc-project/swc/issues/8893 TypeScript removes the `assert` keywords in the transpile, so this PR only works for JavaScript files
2024-04-27chore(lsp): remove ConfigSnapshot (#23579)Nayeem Rahman
2024-04-26refactor(lsp): unify resolver types into LspResolver (#23514)Nayeem Rahman
2024-04-24feat(jsr): support importing from jsr via HTTPS specifiers (except for type ↵David Sherret
checking) (#23513) Closes https://github.com/jsr-io/jsr/issues/322
2024-04-24fix(lsp): inherit missing fmt and lint config from parent scopes (#23547)Nayeem Rahman
2024-04-24chore(lsp): Print out stack trace if exception occurs in TS request (#23543)Nathan Whitaker
Before this PR, there would just be an uninformative "Error occurred" message, after this PR you'll get a stack trace in the LSP output window like this: ```text Error during TS request "$getSupportedCodeFixes": Error: i threw an exception at serverRequest (ext:deno_tsc/99_main_compiler.js:1089:11) ```
2024-04-23fix(lsp): Fix logic for coalescing pending changes + clear script names ↵Nathan Whitaker
cache when file is closed (#23517)
2024-04-23perf(lsp): Call `serverRequest` via V8 instead of via `executeScript` (#23409)Nathan Whitaker
Doesn't have a noticeable perf impact from my benchmarking, but theoretically should be better.
2024-04-22refactor(lsp): use CliGraphResolver in documents params (#23499)Nayeem Rahman
2024-04-22fix(lsp): remove Document::open_data on close (#23483)Nayeem Rahman
2024-04-22perf(lsp): Batch "$projectChanged" notification in with the next JS request ↵Nathan Whitaker
(#23451) The actual handling of `$projectChanged` is quick, but JS requests are not. The cleared caches only get repopulated on the next actual request, so just batch the change notification in with the next actual request. No significant difference in benchmarks on my machine, but this speeds up `did_change` handling and reduces our total number of JS requests (in addition to coalescing multiple JS change notifs into one).
2024-04-20perf(lsp): Pass code action trigger kind to TSC (#23466)Nathan Whitaker
2024-04-20perf(lsp): only store parsed sources for open documents (#23454)Nayeem Rahman
2024-04-19perf(lsp): Avoid passing struct into op_resolve (#23452)Nathan Whitaker
Going through serde_v8 is slow, so just pass the args separately. `op_resolve` is especially hot, so any speedups are good.
2024-04-19refactor: move redirect handling into deno_graph (#23444)David Sherret
2024-04-19perf(lsp): cleanup document dependencies (#23426)Nayeem Rahman
2024-04-17perf(lsp): release unused documents (#23398)Nayeem Rahman
2024-04-17perf: v8 code cache (#23081)Igor Zinkovsky
This PR enables V8 code cache for ES modules and for `require` scripts through `op_eval_context`. Code cache artifacts are transparently stored and fetched using sqlite db and are passed to V8. `--no-code-cache` can be used to disable. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-04-16fix(lsp): slice strings by byte index in code actions (#23387)Nayeem Rahman
Fixes #23361.
2024-04-15fix(lsp): improved cjs tracking (#23374)David Sherret
Our cjs tracking was a bit broken. It was marking stuff as esm that was actually cjs leading to type checking errors.
2024-04-15fix(lsp): ensure project version is incremented when config changes (#23366)David Sherret
I'm running into a node resolution bug in the lsp only and while tracking it down I noticed this one. Fixed by moving the project version out of `Documents`.
2024-04-14refactor(lsp): use fallback resolution in op_resolve() (#23329)Nayeem Rahman
2024-04-12perf(lsp): Only deserialize response from `op_respond` once (#23349)Nathan Whitaker
Previously we were deserializing it twice - once to `serde_json::Value`, and then again from the `serde_json::Value` to a concrete type
2024-04-12chore: upgrade deno_core to 0.274.0 (#23344)Divy Srivastava
Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-04-12chore: remove repetitive words (#23341)youngwendy
Signed-off-by: youngwendy <clonefetch@outlook.com>
2024-04-12fix(inspector): don't panic if port is not free (#22745)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/22113 Closes https://github.com/denoland/deno/issues/23177 Closes https://github.com/denoland/deno/issues/22883 Closes https://github.com/denoland/deno/issues/22377
2024-04-11perf(lsp): use a stub module in tsc for failed resolutions (#23313)Nayeem Rahman
2024-04-11fix(lsp): Denormalize specifiers before calling `$projectChanged` (#23322)Nathan Whitaker
Fixes the regression described in https://github.com/denoland/deno/pull/23293#issuecomment-2049819724. This affected jupyter notebooks, as the LSP was passing in already denormalized specifiers, while the jupyter kernel was not. We need to denormalize the specifiers to evict the proper keys from our caches.
2024-04-10perf(lsp): Only evict caches on JS side when things actually change (#23293)Nathan Whitaker
Currently we evict a lot of the caches on the JS side of things on every request, namely script versions, script file names, and compiler settings (as of #23283, it's not quite every request but it's still unnecessarily often). This PR reports changes to the JS side, so that it can evict exactly the caches that it needs too. We might want to do some batching in the future so as not to do 1 request per change.
2024-04-10refactor(lsp): cleanup documents dependents calculation (#23295)Nayeem Rahman
2024-04-09perf(lsp): More granular locking of `FileSystemDocuments` (#23291)Nathan Whitaker
Previously we locked the entire `FileSystemDocuments` even for lookups, causing contention. This was particularly bad because some of the hot ops (namely `op_resolve`) can end up hitting that lock under contention. This PR replaces the mutex with synchronization internal to `FileSystemDocuments` (an `AtomicBool` for the dirty flag, and then a `DashMap` for the actual documents). I need to think a bit more about whether or not this introduces any problematic race conditions.
2024-04-08perf(lsp): don't pass remote modules as tsc roots (#23259)Nayeem Rahman
2024-04-06refactor(lsp): remove DocumentInner (#23251)Nayeem Rahman
2024-04-05perf(lsp): use lockfile to reduce npm pkg resolution time (#23247)David Sherret
This functionality was broken. The series of events was: 1. Load the npm resolution from the lockfile. 2. Discover only a subset of the specifiers in the documents. 3. Clear the npm snapshot. 4. Redo npm resolution with the new specifiers (~500ms). What this now does: 1. Load the npm resolution from the lockfile. 2. Discover only a subset of the specifiers in the documents and take into account the specifiers from the lockfile. 3. Do not redo resolution (~1ms).
2024-04-05fix(lsp): respect DENO_FUTURE for BYONM config (#23207)Nayeem Rahman
2024-04-04perf(lsp): don't keep remote module ast's in memory (#23230)Nayeem Rahman
2024-04-02fix(lsp): Remove client-facing format failure warning (#23196)Nathan Whitaker
Fixes #23163. The client-facing warning doesn't provide any value and is super annoying. We still emit a warning message on the server side for format errors, which should fulfill the same (less intrusive) purpose.
2024-04-02feat(lsp): respect nested deno.json for fmt and lint config (#23159)Nayeem Rahman
2024-03-31fix(lsp): don't apply preload limit to workspace walk (#23123)Nayeem Rahman
2024-03-31chore(lsp): remove recursion in recurse_dependents (#23153)David Sherret
Was investigating a separate stack overflow (that I've now found in the node resolution code) and came across this. We should avoid recursion (this is very old code).
2024-03-27feat(task): Task description in the form of comments (#23101)Nathan Whitaker
Closes #22786. TLDR; ```jsonc { "tasks": { // Some comment // // describing what the task does "dev": "deno run -A --watch main.ts" } } ``` ```bash deno task ``` ![Screenshot 2024-03-27 at 1 43 49 PM](https://github.com/denoland/deno/assets/17734409/7a14da8c-8e63-45ba-9bfb-590d250b56a9)
2024-03-27fix(lsp): use registry cache for completion search (#23094)Nayeem Rahman
2024-03-27fix(lsp): decoding percent-encoding(non-ASCII) file path correctly (#22582)Hajime-san
2024-03-27fix(lsp): prefer cache over tsc quick fixes (#23093)Nayeem Rahman
2024-03-26feat: TypeScript 5.4 (#23086)David Sherret
Fork PR: https://github.com/denoland/TypeScript/pull/10 Closes #23080
2024-03-26refactor(lsp): unify config file data into ConfigTree (#23032)Nayeem Rahman