Skip to content

Leverage LSP to do compile instead of CLI#7239

Merged
chunyu3 merged 37 commits into
microsoft:mainfrom
chunyu3:lsp
May 15, 2025
Merged

Leverage LSP to do compile instead of CLI#7239
chunyu3 merged 37 commits into
microsoft:mainfrom
chunyu3:lsp

Conversation

@chunyu3

@chunyu3 chunyu3 commented May 6, 2025

Copy link
Copy Markdown
Contributor

Fix #6663

Now we are having many problems when triggering the compile from CLI and handling its output in our Output window like multiple loglevel, how to handle ```stderr``, coloring and so on.

So to resolve all these problems, let's trigger compile through LSP instead of CLI so that we can retrieve the result of compile directly which is more reliable and also easier to do post-processing.

@github-actions

github-actions Bot commented May 6, 2025

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • @typespec/compiler
  • typespec-vscode
Show changes

typespec-vscode - feature ✏️

Use language server to compile project instead of CLI

@typespec/compiler - feature ✏️

[LSP] Expose new compile project command

@azure-sdk

azure-sdk commented May 6, 2025

Copy link
Copy Markdown
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@chunyu3

chunyu3 commented May 6, 2025

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

Comment thread packages/compiler/src/index.ts Outdated
Comment thread packages/compiler/src/server/compile-service.ts Outdated
Comment thread packages/typespec-vscode/src/tsp-language-client.ts
Comment thread packages/typespec-vscode/src/tsp-language-client.ts Outdated
Comment thread packages/typespec-vscode/src/typespec-utils.ts Outdated
Comment thread packages/typespec-vscode/src/vscode-cmd/emit-code/emit-code.ts
Comment thread packages/typespec-vscode/src/vscode-cmd/emit-code/emit-code.ts Outdated
Comment thread packages/typespec-vscode/src/extension-component.ts Outdated
Comment thread packages/typespec-vscode/src/extension-component.ts Outdated
@chunyu3 chunyu3 requested a review from RodgeFu May 15, 2025 00:17
@RodgeFu RodgeFu added the ide Issues for VS, VSCode, Monaco, etc. label May 15, 2025
@chunyu3 chunyu3 requested a review from lirenhe May 15, 2025 05:39
@chunyu3 chunyu3 added this pull request to the merge queue May 15, 2025
Merged via the queue into microsoft:main with commit 14b551e May 15, 2025
24 checks passed
@chunyu3 chunyu3 deleted the lsp branch May 15, 2025 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ide Issues for VS, VSCode, Monaco, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Leverage LSP to do compile instead of CLI

5 participants