Skip to content

Merge EditorFeatures.WPF into EditorFeatures #77707

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

Closed
wants to merge 110 commits into from

Conversation

CyrusNajmabadi
Copy link
Member

@CyrusNajmabadi CyrusNajmabadi commented Mar 20, 2025

Dependent on #78043
VS PR to remove stale references: https://devdiv.visualstudio.com/DevDiv/_git/VS/pullrequest/627486

PR Validation: https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_build/results?buildId=11379092&view=results
PR: https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequest/627912

Need to update PR validation to have Xaml remove reference to EditorFeature.Wpf.dll. They should recompile fine though as the one type they need is still available (just moved). May have optprof regressions.

@ghost ghost added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Mar 20, 2025
@CyrusNajmabadi CyrusNajmabadi changed the base branch from main to release/dev18.0 March 20, 2025 18:18
@CyrusNajmabadi CyrusNajmabadi requested a review from JoeRobich April 9, 2025 22:04
@CyrusNajmabadi CyrusNajmabadi marked this pull request as ready for review April 9, 2025 22:04
@CyrusNajmabadi CyrusNajmabadi requested review from a team as code owners April 9, 2025 22:04
Copy link
Member

@dibarbet dibarbet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Temporarily blocking from an infra perspective - I don't think we should merge this with our current infra issues, unless we have a PR validation.

Hopefully these issues should be resolve in a couple of days.

Copy link
Member

@jasonmalinowski jasonmalinowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking request changes because the change to the publish data will break servicing; feel free to dismiss the block once that's addressed and treat this as a soft approval. (That said I'm happy to take another round on it -- the changes I'm mentioning should be quick to review.)

@@ -44,7 +44,6 @@
"Microsoft.CodeAnalysis.CSharp.EditorFeatures": "vssdk",
"Microsoft.CodeAnalysis.InteractiveHost": "vssdk",
"Microsoft.CodeAnalysis.VisualBasic.EditorFeatures": "vssdk",
"Microsoft.CodeAnalysis.EditorFeatures.Wpf": "vssdk",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to stay around for servicing, since the file in main is used for servicing branches.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you clarify? just so i understand?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main branch PublishData.json is the source of truth for all builds. @dibarbet Recently suggested that release/* branches should simply refer to their own copy.

<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<ApplyNgenOptimization Condition="'$(TargetFramework)' == 'netstandard2.0'">full</ApplyNgenOptimization>
<!--Temporarily bypass ibcmerge due to an error
https://github.com/dotnet/roslyn/issues/57863 -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bug has been closed for years. Check with @dotnet/roslyn-infrastructure but maybe we should just delete this.

@@ -42,6 +42,8 @@ internal sealed class StringCopyPasteData(ImmutableArray<StringCopyPasteContent>
if (string.IsNullOrWhiteSpace(json))
return null;

Contract.ThrowIfNull(json);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a side effect of us dropping the net8.0 target. If you're able to add that back in that'd be good, but I imagine there's problems there.

@@ -175,7 +175,7 @@ private async ValueTask BreakStateOrCapabilitiesChangedAsync(bool? inBreakState,
// The tracking session is cancelled when we exit the break state.

Debug.Assert(solution != null);
GetActiveStatementTrackingService().StartTracking(solution, session);
GetActiveStatementTrackingService().StartTracking(solution!, session);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See other comment: if we can get a net8.0 build this can be removed again.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(do not spend more than 2 minutes seeing if you can add a net8.0/net9.0 target.)

private readonly IAsynchronousOperationListener _listener;
#pragma warning disable RS0030 // Do not use banned APIs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would this be configured to ban this in the first place?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the JTF analyzers seem to hate it. But i'm in the position of: that's too bad, we use this everywhere. :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we merge the resx files? OK for that to be a follow-up since that can get big.

<PackageReference Include="Microsoft.VisualStudio.LanguageServer.Client" PrivateAssets="all" />
<PackageReference Include="Microsoft.VisualStudio.Debugger.Contracts" />
<PackageReference Include="Microsoft.VisualStudio.LanguageServer.Client.Implementation" PrivateAssets="all" />
<PackageReference Include="Microsoft.VisualStudio.Shell.15.0" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reference shouldn't be there -- what's using this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i moved it down when i merged WPF into this. it was in WPF before. i will remove it and see if that's oik.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed. it didn't break anything.

@@ -1 +1,2 @@

Microsoft.CodeAnalysis.Editor.Peek.IPeekableItemFactory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, is this a breaking change since we're moving it from an assembly that doesn't exist anymore? I think I'm OK with that but we should be aware of the potential for having to put a type forward back in.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(or consider making this internal if we're going to break things anyways)

<_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CSharp.Features\$(Configuration)\netstandard2.0\Microsoft.CodeAnalysis.CSharp.Features.dll" TargetDir="" />
<_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CSharp.Scripting\$(Configuration)\netstandard2.0\Microsoft.CodeAnalysis.CSharp.Scripting.dll" TargetDir="" />
<_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CSharp.Workspaces\$(Configuration)\netstandard2.0\Microsoft.CodeAnalysis.CSharp.Workspaces.dll" TargetDir="" />
<_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.CSharp\$(Configuration)\netstandard2.0\Microsoft.CodeAnalysis.CSharp.dll" TargetDir="" />
<_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.EditorFeatures.Text\$(Configuration)\netstandard2.0\Microsoft.CodeAnalysis.EditorFeatures.Text.dll" TargetDir="" />
<_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.EditorFeatures.Wpf\$(Configuration)\net472\Microsoft.CodeAnalysis.EditorFeatures.Wpf.dll" TargetDir="" />
<_File Include="$(ArtifactsBinDir)Microsoft.CodeAnalysis.EditorFeatures\$(Configuration)\netstandard2.0\Microsoft.CodeAnalysis.EditorFeatures.dll" TargetDir="" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to leave the regular EditorFeatures in, I think. Or at least until I delete a few more things from the VS repo.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wait. what still needs this in the VS repo?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a few places I'm seeing references to it. Those could just be copy/pate things where they're not needed anymore. But your options are:

  1. Keep the deletion in for line 82 and then get to fix the VS build for what's consuming it.
  2. Revert the deletion of line 82, and make sorting those out my problem. 😄 You'll still have to fix one place in the XAML build that references EditorFeatures.Wpf but that'll be easier to remove.

@CyrusNajmabadi
Copy link
Member Author

@jasonmalinowski if i try to add support for a later netcore version, i get these errors:

image

@CyrusNajmabadi
Copy link
Member Author

i cannot figure out a way to get nuget to find the set of references that will work here.

@jasonmalinowski
Copy link
Member

@CyrusNajmabadi Ah, Microsoft.VisualStudio.Text.UI.Wpf is still .NET Framework only, so nix that idea. 😦

@CyrusNajmabadi
Copy link
Member Author

Closing. Subsumed by #78494.

@CyrusNajmabadi CyrusNajmabadi deleted the mergeWpfDown branch May 8, 2025 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Needs API Review Needs to be reviewed by the API review council Needs UX Triage untriaged Issues and PRs which have not yet been triaged by a lead VSCode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants