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

Semantic Search: Consider adding support for in-proc query execution #72617

Open
tmat opened this issue Mar 20, 2024 · 2 comments · May be fixed by #73196
Open

Semantic Search: Consider adding support for in-proc query execution #72617

tmat opened this issue Mar 20, 2024 · 2 comments · May be fixed by #73196

Comments

@tmat
Copy link
Member

tmat commented Mar 20, 2024

Currently the feature only works when VS is running Roslyn OOP.

This is to isolate the query execution better and avoid crashing the entire VS if something goes wrong or consume VS process resources.
In addition we are taking advantage of .NET features not available on Desktop, such as managing assembly loading via AssemblyLoadContext and unloading of the generated assembly. We wouldn't be able to unload the assembly when running on Desktop (the assembly itself would leak and we might want to clear all generated static variables to avoid accidentally leaking Roslyn solution snapshot).

With this in mind and some restrictions we could potentially support the feature running in-proc.

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Interactive untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 20, 2024
@tmat tmat mentioned this issue Mar 20, 2024
@CyrusNajmabadi
Copy link
Member

as this is running arbitrary code, including code taht can stack-overflow, my preference would be that we never run things in proc. An isolated process seems like an ideal way to keep things safe.

@tmat
Copy link
Member Author

tmat commented Mar 20, 2024

We do have some guards against stack overflow, but they are not 100% bulletproof.

@dibarbet dibarbet removed the untriaged Issues and PRs which have not yet been triaged by a lead label Mar 28, 2024
sharwell added a commit to sharwell/roslyn that referenced this issue Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants