Skip to content

Deprecate @list decorator in favor of rest's @listsResource#2093

Merged
daviwil merged 6 commits intomicrosoft:mainfrom
daviwil:move-list-decorator
Jun 22, 2023
Merged

Deprecate @list decorator in favor of rest's @listsResource#2093
daviwil merged 6 commits intomicrosoft:mainfrom
daviwil:move-list-decorator

Conversation

@daviwil
Copy link
Copy Markdown
Contributor

@daviwil daviwil commented Jun 20, 2023

This change fixes #1978 by deprecating the virtually-unused @list decorator in favor of the @listsResource decorator in @typespec/rest. I'm also deprecating the associated isListOperation and getListOperationType functions in @typespec/compiler and moving isListOperation to the REST library.

The corresponding typespec-azure PR is here: Azure/typespec-azure#3200

@github-actions
Copy link
Copy Markdown
Contributor

Changes in this PR will be published to the following url to try(check status of TypeSpec Pull Request Try It pipeline for publish status):
Playground: https://cadlplayground.z22.web.core.windows.net/prs/2093/

Website: https://cadlwebsite.z1.web.core.windows.net/prs/2093/

@daviwil daviwil force-pushed the move-list-decorator branch from 56f81fe to 4abea6c Compare June 20, 2023 11:56
@daviwil daviwil force-pushed the move-list-decorator branch from 4abea6c to 2e201c7 Compare June 20, 2023 12:11
Comment thread common/changes/@typespec/compiler/move-list-decorator_2023-06-20-11-35.json Outdated
Comment thread common/changes/@typespec/compiler/move-list-decorator_2023-06-20-11-35.json Outdated
Comment thread common/changes/@typespec/compiler/move-list-decorator_2023-06-20-11-35.json Outdated
```


### `@list` {#@list}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

that is unfortunate that we get the doc now that it is deprecated

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It'd be nice if the deprecation notice came through with it. The only other option is to just take out the extern definition and put the exception for @list back into library-linter, but is that worse?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

yeah I guess that is dependent on the design meeting that was inconclusive last week :(

Comment thread packages/compiler/src/lib/decorators.ts
@@ -118,7 +118,7 @@ describe("rest: routes", () => {
@autoRoute
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@lmazuel do we want to talk about this deprecation, this was an undocumented decorator in the compiler that was only used internally in the rest library.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Any thoughts on this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

probably just bring it up in the DPG meeting today at 11

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sounds like folks are OK with this one going in!

Co-authored-by: Timothee Guerin <timothee.guerin@outlook.com>
@daviwil daviwil mentioned this pull request Jun 22, 2023
@daviwil daviwil merged commit b1eb314 into microsoft:main Jun 22, 2023
@daviwil daviwil deleted the move-list-decorator branch June 22, 2023 18:15
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.

Do we need the @list decorator in compiler

2 participants