-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Try to fix the analyzer path when loading in OOP #55425
Conversation
src/Workspaces/Remote/ServiceHub/Host/RemoteAnalyzerAssemblyLoaderService.cs
Outdated
Show resolved
Hide resolved
This is a hack to temporarily unblock further investigations
b7d7292
to
4212271
Compare
protected override Assembly LoadImpl(string fullPath) | ||
=> base.LoadImpl(FixPath(fullPath)); | ||
|
||
public RemoteAnalyzerAssemblyLoader(string? baseDirectory) |
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 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 shouldn't. I was mulling over whether to set it to null when not targeting .netcore (to avoid these file path operations)
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.
Fixed
var assemblyName = Path.GetFileName(fullPath); | ||
var fixedPath = Path.GetFullPath(Path.Combine(_baseDirectory, assemblyName)); | ||
|
||
if (!PathUtilities.PathsEqual(fixedPath, Path.GetFullPath(fullPath)) && File.Exists(fixedPath)) |
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 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, this is just to short circuit the FileExists call. Probabaly doesn't matter at all, I can remove it
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.
Since the assembly is gonna be read from disk anyways I don't think avoiding File.Exists has any benefit
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.
Fixed
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.
@genlu Just noticed - why main-vs-deps and not main? |
@tmat All the core host related stuff is still not merged back in main yet (we missed the preview 2 cut). While this would work just fine in main, I thought it'd be better to target this with other related changes. |
This fixed the error described in #46687