-
Notifications
You must be signed in to change notification settings - Fork 391
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
Add an API that lets consumers wait on language service to be up-to-date with a given project version #3425
Comments
Happy to test this out when we have one. |
@davkean : Did we get a chance to schedule this work in yet... |
We're doing this as part of the language service hookup rewrite in 15.8. First part is in review, but we've only started on 15.8 this week. We're at least a sprint away from it. |
Any update on this? It seems this is a blocking issue for |
Note also that as part of this work we should use this API to push information to the VS Platform's new Operation Progress API so that we can track the async initialization. |
This fixes a deadlock when the UI thread is blocked on Loaded, such as during PrioritizedProjectLoad. This occured because MultiLifetimeComponent.Loaded was backed by a TaskCompletionSource that did not have a JoinableTask relationship to the code that completed it (MultiLifetimeComponent.LoadAsync). I sat down with Andrew Arnott came up with a design that creates the relationship. I've used the name Publish (mimicing ITreeService, etc) as this method is basically the precursor to dotnet#3425.
This fixes a deadlock when the UI thread is blocked on Loaded, such as during PrioritizedProjectLoad. This occured because MultiLifetimeComponent.Loaded was backed by a TaskCompletionSource that did not have a JoinableTask relationship to the code that completed it (MultiLifetimeComponent.LoadAsync). I sat down with Andrew Arnott came up with a design that creates the relationship. I've used the name Publish (mimicing ITreeService, etc) as this method is basically the precursor to dotnet#3425.
@davkean Any updates on this? Thank you. |
It is December 30, 2018, and we are still on 15.9.4 with no |
Any updates? |
We can be pushed the same value of ConfiguredProjectVersion when other input data source versions change, don't fail in this case. We should be tracking those versions, but I'll leave that for dotnet#3425.
Fixes: dotnet#6121 We can be pushed the same value of ConfiguredProjectVersion when other input data source versions change. Don't fail in this case. We should be tracking those versions, but I'll leave that for dotnet#3425.
Running VS 17.4 preview right now, still nothing after more than 4 years. You folks do awesome work, but a timeline would be good. |
@tanveerbadar can you share the scenario for which you need this API? |
@drewnoakes I had to reread this issue since it's been so long but I believe this is related to having the create unit tests option for .NET Core or these days .NET 7 projects I suppose. :). Thanks. |
My reading of the linked ticket suggests that the unit testing team was able to address that without needing the API described here does that not match your experience? |
Thanks @drewnoakes . This issue is so old I had not revisited it recently. That's great if the unit testing team fixed that issue with the 'create unit tests' option! That's mostly what I was interested in not sure about others here. Thanks. |
My problem was with ProjectItem.FileCodeModel being null after loading a project with my VS extension. This was reported in #2544. My dirty hack was to wait some time to make sure the FileCodeModel is initialized. |
@PeterMacej that makes sense. This is something I hope to implement before long as it would be useful in several places. The challenge is doing it in a way that won't lead to hangs when, for example, configurations are switched. |
There was some issue (which I can't recall) about creating unit tests in VS which linked to this and cited it as the blocking reason. |
@tanveerbadar that issue is no longer blocked on this. |
We need an API that lets consumers wait on the language service to be up-to-date with a given project version, similar to IProjectTreeService.PublishTree:
This lets services such as CodeModel provider to block this before returning a CodeModel item, or the renamer to block on this attempting to rename. Also lets us block VS integration tests on this work before attempting to test state.
Without this, it's impossible to know when ProjectItem.CodeModel is going to return a result.
The text was updated successfully, but these errors were encountered: