Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VSCode] TypeSpec Extension should leverage each emitter to auto-install or detect the dependency missing and provide suggestion on next step #5166

Closed
3 tasks done
lirenhe opened this issue Nov 21, 2024 · 9 comments
Assignees
Labels
1_0_E2E design:needed A design request has been raised that needs a proposal ide Issues for VS, VSCode, Monaco, etc.

Comments

@lirenhe
Copy link
Member

lirenhe commented Nov 21, 2024

Clear and concise description of the problem

Here are a couple of actions needed:

  1. Design the format and the contract of env check result should return.
  2. Define the command e.g. 'tsp compile -check' that could be used by the extension.
  3. Integrate the result into the extension and suggest the follow up action for each language.
    cc @RodgeFu, @lmazuel

Checklist

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
@RodgeFu
Copy link
Contributor

RodgeFu commented Nov 30, 2024

Do we have more detail about the "tsp compile --check"? like

  1. How would it report the dependency error (i.e. will it be able to report the error through diagnostics with some code like "missing-dependency" and related url/codefix actions so that user can interact with in ide?)?
  2. If "tsp compile" is called without "--check", what kind of error would emitter report? shouldn't it be the same as the one when "--check" is used? thx

@lirenhe lirenhe changed the title [VSCode] TypeSpec Extension should leverage each emitter to detect the dependency missing and provide suggestion on next step [VSCode] TypeSpec Extension should leverage each emitter to auto-install or detect the dependency missing and provide suggestion on next step Dec 3, 2024
@lirenhe
Copy link
Member Author

lirenhe commented Dec 3, 2024

Let's try to ensure all dependencies could be auto installed by using npm install for all languages..

@lirenhe
Copy link
Member Author

lirenhe commented Dec 3, 2024

We are looking for an experience in vscode that when a user open a tsp in a clean machine, vscode extension could guide and help the user to get everything configured properly to work on the target machine, including SDK generation.

Considering the external dependencies for each CodeGen, to achieve the above goal, we are thinking of 2 options:

  1. Integrate dependencies installation by using npm install which will be invoked in vscode for client generation,
  2. Each emitter could do pre-check for dependencies before generating the SDK.

@jsquire jsquire assigned schaabs and unassigned chunyu3 Dec 4, 2024
@jsquire
Copy link
Member

jsquire commented Dec 4, 2024

@lirenhe: This is not something that I'm aware of as a feature that has been reviewed and approved to move forward by the C# team. Has this been brought to Scott and Arthur for discussion? If so, I would expect that he's handling the design and filing any issues needed to facilitate work.

Please do not move forward with this without discussing with Scott and myself. The same is true for any features in the C# emitter, generator, or extensions. The Shanghai team working on C# should only be taking direction from Arthur and myself.

//cc: @schaabs, @ArthurMa1978, @lmazuel

@m-nash
Copy link
Member

m-nash commented Dec 4, 2024

Let's try to ensure all dependencies could be auto installed by using npm install for all languages..

@lirenhe what mechanism are you proposing we use for this? Can you give a sample package.json that would accomplish this with hello world?

@lirenhe
Copy link
Member Author

lirenhe commented Dec 5, 2024

@lirenhe: This is not something that I'm aware of as a feature that has been reviewed and approved to move forward by the C# team. Has this been brought to Scott and Arthur for discussion? If so, I would expect that he's handling the design and filing any issues needed to facilitate work.

Please do not move forward with this without discussing with Scott and myself. The same is true for any features in the C# emitter, generator, or extensions. The Shanghai team working on C# should only be taking direction from Arthur and myself.
//cc: @schaabs, @ArthurMa1978, @lmazuel

@jsquire, this item has the label of 'ide' which means this is a vscode item that defines the vscode extension experience I described above in #5166 (comment). It is to follow up the suggestion from the previous leadership meeting.
I created separate issue for each language to support this experience in vscode and it is up to each language team to decide how we could support this.
I found you assign @schaabs for this item but I don't think Scott will work on vscode extension, right?

@ArthurMa1978 was involved at the beginning when this item was created, we discussed and proposed a couple of options listed in my above comment. I think this item is still in design phrase so sure, people won't move forward without your decision.

@lirenhe
Copy link
Member Author

lirenhe commented Dec 5, 2024

Let's try to ensure all dependencies could be auto installed by using npm install for all languages..

@lirenhe what mechanism are you proposing we use for this? Can you give a sample package.json that would accomplish this with hello world?

@m-nash, I updated my points this comments: #5166 (comment)
People come up with a couple of proposals to solve the dependency missing problem, so I am asking each language team to discuss and investigate what we could do to achieve this vscode experience. It is mainly for discussion not the decision.

@jsquire
Copy link
Member

jsquire commented Dec 5, 2024

I found you assign @schaabs for this item but I don't think Scott will work on vscode extension, right?

@lirenhe : Anything in the VS Code extension, no. This item has to do with modifying the C# TypeSpec tooling and is not constrained to the extension itself. Whether used by this extension or elsewhere, anything related to the generator, emitter, or common TypeSpec tooling must run through the same process.

@lirenhe
Copy link
Member Author

lirenhe commented Feb 12, 2025

Close this item as all IDE work and related emitter work completed. Feel free to reopen it if there are any additional work needed.

@lirenhe lirenhe closed this as completed Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1_0_E2E design:needed A design request has been raised that needs a proposal ide Issues for VS, VSCode, Monaco, etc.
Projects
None yet
Development

No branches or pull requests

6 participants