-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Interactive projects refactoring #29069
Conversation
08fada5
to
b417817
Compare
Filed issue on the warning: #29070. |
@tmat What required the "creation" (ish, I recognize it's kinda a rename) of EditorFeatures.Wpf stuff for C# and VB? Looking at what's in there, it looks like there's very little, if anything, that depends on Wpf per se. And the hope was we never did need these projects because we never expect to do language specific UIs, at least any time soon. What would prevent us from simply merging the code entirely? A different way of looking at it: we want those features in Visual Studio for Mac, right? 😄 |
These few types depend on Interactive Window, which depends on WPF types. Note that InteractiveEvaluator, the base class of CSharpInteractiveEvaluator depends on IW. |
@@ -632,6 +632,11 @@ Public Class BuildDevDivInsertionFiles | |||
Continue For | |||
End If | |||
|
|||
If partFileName.EndsWith(".resources.dll") Then |
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.
@tmeschter FYI. The Roslyn VSIX now includes DesktopHost directory that contains InteractiveHost.exe and satellite assemblies for its dependencies. Since InteractiveHost is launched as a separate process it needs all its dependencies (including satellites) in its directory.
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.
@tmat Don't include the .resource.dll files in the main VSIX--that will cause us to install all of them regardless of the lang packs the user selects in the VS Installer.
I'm in the process of recreating the resource-specific VSIXes--which used to build in the VS repo--in the dotnet/roslyn repo. I'll handle laying out the resource DLLs for InteractiveHost*.exe in the new locations as part of that.
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.
Do you mean that the resources will be included in a different VSIX than the binaries and VS assembly loader is able to find them there?
That won't work for Interactive Host though, since Interactive Host process has no knowledge of Visual Studio.
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.
They will be in a different VSIX, yes, but a VSIX that installs to the same directory as the Language Service VSIX; there won't be any problem finding the resource assemblies.
That's already how our resource assemblies are handled in VS--I'm just moving the generation of those VSIXes out of the VS repo and into the dotnet/roslyn repo.
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.
Oh, I see. OK.
3ed45e6
to
8d053a3
Compare
test windows_debug_vs-integration_prtest please |
c926a19
to
5df1409
Compare
test this please |
@@ -57,7 +57,7 @@ | |||
<InternalsVisibleTo Include="csc" /> | |||
<InternalsVisibleTo Include="csi" /> | |||
<InternalsVisibleTo Include="Microsoft.CodeAnalysis.CSharp.Scripting" /> | |||
<InternalsVisibleTo Include="Microsoft.CodeAnalysis.CSharp.InteractiveEditorFeatures" /> | |||
<InternalsVisibleTo Include="Microsoft.CodeAnalysis.CSharp.EditorFeatures.Wpf" /> |
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.
@jaredpar for approving this IVT
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 is just a project rename.
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.
@tmat Thanks, didn't realize that!
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.
Woah this definitely shouldn't be there. It violates our principals. It's a rename so no blocker here but this needs to go.
In reply to: 208757002 [](ancestors = 208757002)
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.
What principles does it violate?
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.
The compiler and "everything else" should never have IVT access between each other. Yeah this is violated today by debugging and scripting code. But once discovered we've been holding the line against further expansion of this.
I just did a quick check: only thing we seem to need here is BinderFlags
and WithTopLevelBinderFlags
. Maybe we should just make that public.
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, we should make them public. There is no expansion of that in this PR though.
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.
Agree. This just alerted me to the problem and wanted to dive into it. Will file a follow up issue.
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.
...ualStudio/VisualStudioInteractiveComponents/Roslyn.VisualStudio.InteractiveComponents.csproj
Outdated
Show resolved
Hide resolved
e2dedab
to
7ea394d
Compare
test windows_debug_vs-integration_prtest please |
1 similar comment
test windows_debug_vs-integration_prtest please |
7ea394d
to
ccf2474
Compare
test windows_release_unit32_prtest please |
test windows_debug_vs-integration_prtest please |
test windows_release_vs-integration_prtest please |
test windows_release_vs-integration_prtest please |
test windows_debug_vs-integration_prtest please |
test windows_debug_vs-integration_prtest please |
@jasonmalinowski Ping |
@tmat Just to better understand this comment from awhile back:
Is the core issue that at least IInteractiveWindow exposes an IWpfTextView? If it was only a regular ITextView would we have been able to keep a "WPF parts of the interactive window" and "platform independent parts of the interactive window?" I recognize I'm asking for a time machine (or a breaking change), just trying to understand exactly what it would take to support all of this on VS for Mac, at least as a thought experiment. |
@jasonmalinowski Yes, that is correct. We can look into solving that issue, but it's certainly outside of the scope of this PR. |
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.
Some comments. A bunch are just some quick fixes for things that tend to happen when you're doing large refactorings like this.
I am a bit worried though about the linked-file hackery going on that is resulting in more extern aliases and other confusion. This has bit us in the past and is a common thorn in the side. Can't tell if this is making things better or worse, but if there's an opportunity to make things better I think that might be good.
src/EditorFeatures/CSharp.Wpf/Microsoft.CodeAnalysis.CSharp.EditorFeatures.Wpf.csproj
Outdated
Show resolved
Hide resolved
src/EditorFeatures/Core.Wpf/Microsoft.CodeAnalysis.EditorFeatures.Wpf.csproj
Show resolved
Hide resolved
<ProjectReference Include="..\..\Interactive\Host\InteractiveHost32.csproj"> | ||
<Ngen>false</Ngen> | ||
<ProjectReference Include="..\..\Interactive\DesktopHost\InteractiveHost32.csproj"> | ||
<IncludeOutputGroupsInVSIX>BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies;GetCopyToOutputDirectoryItems</IncludeOutputGroupsInVSIX> |
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.
Isn't this still going to include binaries in this VSIX? This seems to be backwards from what I would have assumed which this is now empty per the comment at the top?
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.
I guess we can remove the binaries.
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, no I think we need to keep these here. That's the point of the project - it collects all dependencies and adds them to VSIXSourceItem
. This list is then returned from VsixSourceItemsOutputGroup
target to the project that includes them.
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.
Oh. Why aren't we just putting the project references for InteractiveHost that are here directly in the setup package then that is consuming the output group? The layer of indirection seems odd, especially because this isn't just pulling in direct InteractiveHost contents either -- since this is also referencing things like Microsoft.CodeAnalysis.CSharp.dll and also apparently including them, it means we're ending up with two paths where files end up in the final setup package.
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 means we're ending up with two paths where files end up in the final setup package.
That is indeed the goal :)
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.
But then we can't delete this project? Then it seems sad.
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.
Right, the project is needed.
src/VisualStudio/VisualStudioInteractiveComponents/source.extension.vsixmanifest
Outdated
Show resolved
Hide resolved
src/Workspaces/Core/Portable/Microsoft.CodeAnalysis.Workspaces.csproj
Outdated
Show resolved
Hide resolved
Makes sense. I was mostly just heading off the inevitable question when somebody who works on VS for Mac asks "why is this all in the WPF layer?". |
1944693
to
d8680a8
Compare
@jasonmalinowski OK to merge? |
@tmat Still a bunch of unanswered questions in my comments above? |
@tmat Still a bunch of unanswered questions in my comments above? |
I don't want to spend more time refactoring our extensions and helpers. We can fix that later, but that's outside of the scope of this PR. It's big as it is and I am continuously spending my time rebasing it. |
b64eb47
to
7106bb6
Compare
@jasonmalinowski I believe all feedback has need resolved. |
@tmat I think only remaining question now is just this comment. I get we need a temporary project for F5 so we have an "empty" VSIX to temporarily replace the base which can go away once we're on a dogfood drop, but the fact this is also being used to flow build dependencies in a novel way to me is surprising. I'm not sure why we're not just moving that to the Roslyn.VisualStudio.Setup directly and skipping that project entirely. |
We need the Roslyn.VisualStudio.Setup VSIX to have two copies of Microsoft.CodeAnalysis.dll and other binaries that both the InteractiveHost process and the IDE depend on. The resulting layout is like so:
|
0f099b7
to
4243e9e
Compare
@jasonmalinowski ping |
4243e9e
to
7199a0c
Compare
Remove Repl projects Remove Microsoft.VisualStudio.InteractiveServices project Remove Microsoft.CodeAnalysis.InteractiveEditorFeatures Rename InteractiveEditorFeatures to EditorFeatures.Wpf Remove empty resource files Reduce InteractiveFeatures dependencies Merge InteractiveComponents content into Roslyn.VisualStudio.Setup VSIX Rename InteractiveFeatures to InteractiveHost Hook fatal error handlers Workaround warning CS1574 Exclude CreateTemplateManifestsCacheFile Do not include satellite assemblies in DesktopHost directory Remove VB interactive menu item Delete VisualBasic.EditorFeatures.Wpf Delete more unused VB interactive code
7199a0c
to
d3dd2e4
Compare
This reverts commit e0a8124.
Merges interactive projects into corresponding language service projects and InteractiveComponents VSIX to Roslyn.VisualStudio.Setup.
InteractiveHost*.exe now lives under
DesktopHost
subdirectory of Roslyn.VisualStudio.Setup VSIX install directory. The directory contains the minimal set of dependencies that the host needs to execute scripts.Recommended review strategy is commit by commit.