-
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
Consume newer Roslyn APIs for language services #9455
Conversation
Roslyn recently introduced async API for obtaining and releasing "batch" objects for applying updates. This increases the package versions, uses the newer API, fixes some obsolete usages, and gets things building by adding a few package references in order to break the tie on some assembly version conflicts during build. The package `Microsoft.VisualStudio.Internal.MicroBuild.Swix` was removed, as it conflicted with behaviour inherited via `microsoft.visualstudioeng.microbuild.plugins.swixbuild`, which now comes in transitively, resulting in errors running `swc`. Having both loaded was doubling up the items used to populate arguments, and it was throwing _An item with the same key has already been added._
...crosoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/LanguageServices/Workspace.cs
Outdated
Show resolved
Hide resolved
Looks like I'll need to find another workaround for the conflict between:
|
...crosoft.VisualStudio.ProjectSystem.Managed.VS/ProjectSystem/VS/LanguageServices/Workspace.cs
Outdated
Show resolved
Hide resolved
...System.Managed.VS.UnitTests/Microsoft.VisualStudio.ProjectSystem.Managed.VS.UnitTests.csproj
Outdated
Show resolved
Hide resolved
Adding notes here as I investigate the SWIX conflicts that fall out of these package upgrades: The error I see is:
I believe that exception is coming from here where "preprocessor defines" are being added. Looking at the binlog shows the task does indeed have duplicates: Task logs its
Where These defines are coming from
They have near-identical code. Indeed one appears to have been copied from the other. My assumption is that they're not intended to be used together. I had previously tried removing
So now my plan is to find out why we're bringing in the other ( |
This doesn't work locally, but I'm curious if it works in CI.
There's no mention of that package in the dependencies tree though. Looking in the assets file ( Pushed another experimental commit. |
That's making progress. Now we have test failures. I assume this is due to updates to
Stack Trace:
There are test failures with |
That exception is thrown here: I was able to fix these issues by suppressing the synchronization context for the tests in question. |
We were seeing a new error in the tests modified here: > An attempt to switch to the main thread failed to reach the expected thread. Looking at the JTC source in https://github.com/microsoft/vs-threading/blob/e4417b768162ac74b43e251320d11de771e7653b/src/Microsoft.VisualStudio.Threading/JoinableTaskFactory.cs#L854 shows that if the synchronisation context is null, then validation is skipped. This change adds a new utility method that allows the current `SynchronizationContext` to be `null` for a given scope. We add it around the two tests that were failing with this exception.
@tmeschter @ToddGrun this is ready for review now. |
The Roslyn interaction part LGTM |
...crosoft.VisualStudio.ProjectSystem.Managed.UnitTests/Utilities/SynchronizationContextUtil.cs
Outdated
Show resolved
Hide resolved
...jectSystem.Managed.UnitTests/ProjectSystem/Properties/AssemblyInfoPropertiesProviderTests.cs
Show resolved
Hide resolved
...crosoft.VisualStudio.ProjectSystem.Managed.UnitTests/Utilities/SynchronizationContextUtil.cs
Show resolved
Hide resolved
We are reverting this because it's broken build signing and is blocking other work. Will revisit. |
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1881089 Roslyn recently introduced async API for obtaining and releasing "batch" objects for applying updates in dotnet/roslyn#72424. This change increases the package versions, uses the newer API, fixes some obsolete usages, and gets things building by adding a few package references in order to break the tie on some assembly version conflicts during build. This is another iteration of dotnet#9455, which was reverted due to issues it created during signing. Unlike that prior PR, this does not remove Microsoft.VisualStudio.Internal.MicroBuild.Swix`, so I expct the same issues about duplicated items to appear.
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1881089 Roslyn recently introduced async API for obtaining and releasing "batch" objects for applying updates in dotnet/roslyn#72424. This change increases the package versions, uses the newer API, fixes some obsolete usages, and gets things building by adding a few package references in order to break the tie on some assembly version conflicts during build. This is another iteration of dotnet#9455, which was reverted due to issues it created during signing. Unlike that prior PR, this does not remove Microsoft.VisualStudio.Internal.MicroBuild.Swix`, so I expct the same issues about duplicated items to appear.
Fixes https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1881089
Roslyn recently introduced async API for obtaining and releasing "batch" objects for applying updates in dotnet/roslyn#72424.
This change increases the package versions, uses the newer API, fixes some obsolete usages, and gets things building by adding a few package references in order to break the tie on some assembly version conflicts during build.
The package
Microsoft.VisualStudio.Internal.MicroBuild.Swix
was removed, as it conflicted with behaviour inherited viamicrosoft.visualstudioeng.microbuild.plugins.swixbuild
, which now comes in transitively, resulting in errors runningswc
. Having both loaded was doubling up the items used to populate arguments, and it was throwing An item with the same key has already been added.Microsoft Reviewers: Open in CodeFlow