[all-commits] [llvm/llvm-project] 3c7e46: [mlir-vscode] Fix processing of files not within t...

River Riddle via All-commits all-commits at lists.llvm.org
Mon Apr 11 15:41:48 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3c7e4674061f0ef38a53ab219ed0c01b1ea937fa
      https://github.com/llvm/llvm-project/commit/3c7e4674061f0ef38a53ab219ed0c01b1ea937fa
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2022-04-11 (Mon, 11 Apr 2022)

  Changed paths:
    M mlir/utils/vscode/src/mlirContext.ts

  Log Message:
  -----------
  [mlir-vscode] Fix processing of files not within the workspace

In a previous commit we added proper support for separate configurations
per workspace folder, but that effectively broke support for processing out-of-workspace
files. Given how useful this is (e.g. when iterating on a test case in /tmp), this
commit refactors server creation to support this again. We support this case using
a "fallback" server that specifically handles files not within the workspace. This uses
the configuration settings for the current workspace itself (not the specific folder).

Differential Revision: https://reviews.llvm.org/D123183


  Commit: 4a6f5d73a4d16e36baa9639642533b4eb700adf2
      https://github.com/llvm/llvm-project/commit/4a6f5d73a4d16e36baa9639642533b4eb700adf2
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2022-04-11 (Mon, 11 Apr 2022)

  Changed paths:
    M mlir/utils/vscode/src/configWatcher.ts
    M mlir/utils/vscode/src/mlirContext.ts

  Log Message:
  -----------
  [mlir-vscode] Refactor server creation to be lazy

We currently proactively create language clients for every workspace folder,
and every language. This makes startup time more costly, and also emits errors
for missing language servers in contexts that the user currently isn't in. For example,
if a user opens a .mlir file we don't want to emit errors about .pdll files. We also don't
want to emit errors for missing servers in workspace folders that don't even utilize
MLIR.

This commit refactors client creation to lazy-load when a document that requires the
server is opened.

Differential Revision: https://reviews.llvm.org/D123184


  Commit: e93ba84262a98595fa5b13bdc47d4ee02d6fcd36
      https://github.com/llvm/llvm-project/commit/e93ba84262a98595fa5b13bdc47d4ee02d6fcd36
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2022-04-11 (Mon, 11 Apr 2022)

  Changed paths:
    M mlir/utils/vscode/package.json
    M mlir/utils/vscode/src/extension.ts
    M mlir/utils/vscode/src/mlirContext.ts

  Log Message:
  -----------
  [mlir-vscode] Don't emit errors if the user didn't set the server path

This avoids emitting errors in situations where the user doesn't have a server
setup, and doesn't mean to (e.g. when they merely want syntax highlighting).

Differential Revision: https://reviews.llvm.org/D123240


Compare: https://github.com/llvm/llvm-project/compare/195a8b977efe...e93ba84262a9


More information about the All-commits mailing list