Skip to content

Remove workarounds for bugs in Microsoft.VisualStudio.Extensibility.JsonGenerators.Sdk #79182

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

Merged

Conversation

jasonmalinowski
Copy link
Member

No description provided.

@jasonmalinowski jasonmalinowski requested review from a team as code owners June 27, 2025 23:13
@jasonmalinowski jasonmalinowski self-assigned this Jun 27, 2025
<PackageVersion Include="Microsoft.VisualStudio.Extensibility.JsonGenerators.Sdk" Version="17.12.2037-preview3" />
<PackageVersion Include="Microsoft.VisualStudio.Extensibility.Sdk" Version="18.0.52-preview1" />
<PackageVersion Include="Microsoft.VisualStudio.Extensibility" Version="18.0.52-preview1" />
<PackageVersion Include="Microsoft.VisualStudio.Extensibility.JsonGenerators.Sdk" Version="18.0.52-preview1" />
Copy link
Member Author

Choose a reason for hiding this comment

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

My initial hope was to just be able to bump this specific package version, but the generator itself has an assertion that the version in this must match the of the Extensibility contracts being used. This means that we can't take a new version of the generator to workaround a bug without also implicitly bumping which versions of VS we're targeting. So I'm putting this in main-vs-deps which can take the bump just fine.

@matteo-prosperi just an FYI but this might become a problem at some point. It's been very common over the years that Roslyn needs to take bumps to the build tools to get fixes there, but can't necessarily take a bump on what version we're targeting. I imagine customers wanting to target older versions might also run into challenges here. I can absolutely understand having the SDK tooling older than the targeted contracts is bad and doesn't make sense, but it'd seem the other way around should be safe to do?

Copy link
Contributor

Choose a reason for hiding this comment

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

I can see us removing the strict requirement of versions matching and using instead a major+minor version match only.
This would only change things for internal teams since we only publish one version of these packages to nuget.org for each VS minor version. But it would allow us to patch a minor version of Microsoft.VisualStudio.Extensibility.JsonGenerators.Sdk if some issue is found.
Some sort of alignment between Microsoft.VisualStudio.Extensibility.JsonGenerators.Sdk and Microsoft.VisualStudio.Extensibility.Contracts is required since the generator must be able to interpret the configuration types defined in .Contracts.

Copy link
Member Author

Choose a reason for hiding this comment

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

Some sort of alignment between Microsoft.VisualStudio.Extensibility.JsonGenerators.Sdk and Microsoft.VisualStudio.Extensibility.Contracts is required since the generator must be able to interpret the configuration types defined in .Contracts

So I can absolutely imagine that the generator needs to be "newer" than the contracts, since otherwise it won't know how to interpret new types of things. But as long as the generator is newer than the contracts, I'd imagine you'd be fine, unless over time how an expression is generated might change for newer VS targets. (But I'd assume that'd be rare.)

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 discovered this file while deleting the other workaround. I was able to build just fine, so probably safe to delete? 🤷

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like it was added just for that workaround in the Json generators nuget package, seems safe to get rid off from history at least.

@jasonmalinowski jasonmalinowski merged commit 63ffd5d into dotnet:main-vs-deps Jul 2, 2025
24 of 28 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jul 2, 2025
@jasonmalinowski jasonmalinowski deleted the remove-workarounds branch July 2, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants