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 new option, deprecate old one and make default valuable for example directory #1368

Merged
merged 9 commits into from
Sep 6, 2024

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Aug 13, 2024

fix #1173
fix azure/typespec-azure-pr#2754

@timotheeguerin timotheeguerin added the deprecation A previously supported feature will now report a warning and eventually be removed label Aug 13, 2024
@azure-sdk
Copy link
Collaborator

azure-sdk commented Aug 13, 2024

All changed packages have been documented.

  • @azure-tools/typespec-autorest
Show changes

@azure-tools/typespec-autorest - deprecation ✏️

Replace examples-directory with examples-dir which will validate an absolute path is provided,> ,> Case 1: Examples are in examples directory next to tspconfig.yaml. In this case the option can just be removed,> diff,> - examples-directory: examples,> ,> ,> diff,> - examples-directory: {project-root}/examples,> ,> ,> Case 2: Examples are in a different directory,> diff,> - examples-directory: autorest-examples,> + examples-dir: {project-root}/autorest-examples,> ,> ,> diff,> - examples-directory: {project-root}/autorest-examples,> + examples-dir: {project-root}/autorest-examples,>

@timotheeguerin timotheeguerin changed the title Add new option, deprecate old one and make default valuable Add new option, deprecate old one and make default valuable for example directory Aug 13, 2024
@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs

Copy link
Member

@markcowl markcowl left a comment

Choose a reason for hiding this comment

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

Mostly looks good. Given that we weren't really loading form './examples' before, feels like we should protect this behavior with a test

packages/typespec-autorest/test/decorators.test.ts Outdated Show resolved Hide resolved
@timotheeguerin timotheeguerin added this pull request to the merge queue Sep 6, 2024
Merged via the queue into Azure:main with commit 3c0b50b Sep 6, 2024
22 checks passed
@timotheeguerin timotheeguerin deleted the new-option-examples-dir branch September 6, 2024 22:36
markcowl added a commit to markcowl/typespec-azure that referenced this pull request Sep 7, 2024
…le directory (Azure#1368)

fix Azure#1173
fix Azure/typespec-azure-pr#2754

---------

Co-authored-by: Mark Cowlishaw <markcowl@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation A previously supported feature will now report a warning and eventually be removed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Specs can fail to load examples when compiled from outside spec folder
3 participants