-
Notifications
You must be signed in to change notification settings - Fork 46
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
[azure core] "@azure-tools/typespec-azure-core/property-name-conflict" throwing when renamed with @clientName #417
Comments
|
This issue doesn't appear to be related to dotnet only (unless I am missing something). It sounds like the error comes from when someone uses @clientName to create a naming conflict? For example //main.tsp
model Foo {
}
model Bar {
} //client.tsp
@@clientName(Bar, "Foo", "python"); This should be an error diagnostic in tcgc since you have created a "compilation issue". I don't think this has anything to do with moving the existing linter to tcgc either (although there might be independent merits for that). I think its worth considering how tcgc should raise these compilation errors and whether or not they should raise all errors if there are any in the client.tsp regardless of scope so we don't get the situation where it works great in dotnet then all of a sudden when someone tries python it fails because the bad rename was scoped to only python. I think tcgc should throw regardless of current scope if any renames create a conflict so that customers see the error immediately and fix as early as possible. |
rule here: https://github.com/Azure/typespec-azure/blob/main/packages/typespec-azure-core/src/rules/property-naming.ts
Since
@clientName
is a tcgc decorator, andazure-core
seems to be throwing this error forcsharp
, I think we should move this linter either into tcgc or typespec-csharpThe text was updated successfully, but these errors were encountered: