Skip to content
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

Add an analyzer to prevent use of some internal shared source types #6642

Merged
merged 20 commits into from
Aug 11, 2023

Conversation

annelo-msft
Copy link
Member

@annelo-msft annelo-msft commented Aug 2, 2023

For the JSON Merge Patch work, we want to use MutableJsonDocument and related types in Azure SDK Patch models.

The proposal to do this involves moving MutableJsonDocument and related types into internal shared source temporarily to accelerate the generator work on models for PATCH operations. However, we do not want libraries we don't know about taking dependencies on MutableJsonDocument, so that we have the freedom to change its API when we later make it a public type.

This analyzer will prevent projects in the azure-sdk-for-net repo from using MutableJsonDocument and related types. Anyone who uses the type will have to knowingly suppress this warning and therefore opt-into the risk of breaking changes we might make in the future before it becomes a public type. The analyzer is sufficiently general to be used with any other internal shared source types we want to limit use of outside Azure.Core.

@annelo-msft annelo-msft changed the title Add an analyzer to block use of internal shared source types we want to lock down Add an analyzer to prevent use of some internal shared source types Aug 9, 2023
Copy link
Member

@heaths heaths left a comment

Choose a reason for hiding this comment

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

A few nits/tips, but otherwise LGTM.

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.

5 participants