-
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
[WIP] Language Service hookup rewrite #3423
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3423 +/- ##
=========================================
- Coverage 67.93% 67.7% -0.23%
=========================================
Files 728 733 +5
Lines 36608 36668 +60
Branches 2128 2128
=========================================
- Hits 24869 24827 -42
- Misses 11331 11433 +102
Partials 408 408
Continue to review full report at Codecov.
|
_activationTracking.ImplicitlyDeactivated += OnImplicitlyDeactivated; | ||
|
||
if (_activationTracking.IsImplicitlyActive) | ||
return LoadAsync(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is LoadAsync
meant to be idempotent? Isn't there a race here if the event fires between subscription and here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a race here; if we deactivate after we check this property - we'll Load but never unload until project tear down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, I don't know of a good way to do this without locks. I think I need to rethink using events for this, ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I've figured out a better way to do this - I'm going to drop the events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: this(project, null) | ||
{ | ||
} | ||
|
||
[ImportingConstructor] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it should.
|
||
public void Initialize(IWorkspaceProjectContext context) | ||
{ | ||
_context = context; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's expected that we can overwrite the once given in the constructor now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, problem is supporting both language services hosts; one grabs them via MEF, the other manually creates them. I'll add an assert.
51aebc0
to
28d894b
Compare
I had to rebase this, and will need to rebase in the future, so I'd hold off reviewing at the moment. |
Please still hold off reviewing this. |
51eaa93
to
24ba844
Compare
This has been closed in lieu of the features/LanguageService branch. |
It's still being worked on, just one commit at a time in the |
This is a rewrite of the language service hookup that moves from an all knowing single object
LanguageServiceHost
that is aware of all configurations and related IWorkspaceProjectContext, to instead individual configured-project-based servicesWorkspaceContextHostInstance
that get fired up and torn down when a configuration becomes "implicitly" active. This naturally supports active config switches from debug -> release, and multi-targeting projects.This also fixes: #2733.
Currently this lives alongside the existing language service hookup, but is intended to replace it.
Lots of TODOs: