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

"incompatible versioned reference" in function signature #2688

Closed
mikeharder opened this issue Nov 22, 2023 · 2 comments · Fixed by #2691 or #2692
Closed

"incompatible versioned reference" in function signature #2688

mikeharder opened this issue Nov 22, 2023 · 2 comments · Fixed by #2691 or #2692
Assignees
Labels
bug Something isn't working

Comments

@mikeharder
Copy link
Contributor

Introduced by #2684.

run command:npx --no tsp compile client.tsp --no-emit --warn-as-error
TypeSpec compiler v0.51.0-dev.7

Diagnostics were reported during compilation:

/mnt/vss/_work/1/s/specification/cognitiveservices/OpenAI.Inference/models/completions/chat_completions.tsp:87:3
- error @typespec/versioning/incompatible-versioned-reference: 'Azure.OpenAI.getChatCompletionsWithAzureExtensions'
was added in version 'v2023_08_01_Preview' but contains type 'Azure.OpenAI.(anonymous model).functions' added in
version 'v2023_07_01_Preview'.
> 87 |   functions?: FunctionDefinition[];
     |   ^^^^^^^^^
run command:npx --no tsp compile client.tsp --no-emit --warn-as-error
TypeSpec compiler v0.51.0-dev.7

Diagnostics were reported during compilation:

/mnt/vss/_work/1/s/specification/eventgrid/Azure.Messaging.EventGrid/main.tsp:315:6
- error @typespec/versioning/incompatible-versioned-reference: 'Microsoft.EventGrid.releaseCloudEvents' is referencing
versioned type 'Microsoft.EventGrid.(anonymous model).releaseDelayInSeconds' but is not versioned itself.
> 315 |   op releaseCloudEvents is StandardOperations.ResourceAction<
      |      ^^^^^^^^^^^^^^^^^^
@tjprescott tjprescott added the bug Something isn't working label Nov 22, 2023
@tjprescott tjprescott changed the title "incompatible versioned reference" in anonymous models "incompatible versioned reference" in function signature Nov 22, 2023
tjprescott added a commit to tjprescott/typespec that referenced this issue Nov 22, 2023
tjprescott added a commit to tjprescott/typespec that referenced this issue Nov 22, 2023
tjprescott added a commit to tjprescott/typespec that referenced this issue Nov 22, 2023
@mikeharder mikeharder reopened this Nov 22, 2023
@mikeharder
Copy link
Contributor Author

First error message is fixed by #2691. Second error message is not:

https://dev.azure.com/azure-sdk/public/_build/results?buildId=3285684&view=results

@tjprescott
Copy link
Member

Playground

tjprescott added a commit to tjprescott/typespec that referenced this issue Nov 22, 2023
tjprescott added a commit to tjprescott/typespec that referenced this issue Nov 22, 2023
tjprescott added a commit to tjprescott/typespec that referenced this issue Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants