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

Make decorators order independent #11380

Merged
merged 6 commits into from Jul 28, 2023
Merged

Conversation

jeskew
Copy link
Contributor

@jeskew jeskew commented Jul 28, 2023

Resolves #11308

This PR updates the TemplateWriter to apply type modifying decorators in a fixed order rather than one dependent on the order in which the decorators appear in the template's Bicep source.

Because @metadata() and @description() may sometimes be in conflict with one another, TemplateWriter will now prefer whatever appears within the @description() decorator due to its higher specificity and to match the information shown in hovers/tooltips in such scenarios. A linter has been added that will warn template authors when @metadata() and @description() are in conflict.

Microsoft Reviewers: codeflow:open?pullrequest=https://github.com/Azure/bicep/pull/11380&drop=dogfoodAlpha

@jeskew jeskew requested a review from a team July 28, 2023 17:32
Copy link
Contributor

@shenglol shenglol left a comment

Choose a reason for hiding this comment

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

:shipit:

@github-actions
Copy link
Contributor

github-actions bot commented Jul 28, 2023

Test Results (linux-x64)

       33 files  ±0         33 suites  ±0   29m 58s ⏱️ + 3m 41s
10 171 tests +2  10 171 ✔️ +2  0 💤 ±0  0 ±0 
12 387 runs  +2  12 387 ✔️ +2  0 💤 ±0  0 ±0 

Results for commit 0f4eb7b. ± Comparison against base commit 2499ee5.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 28, 2023

Test Results (win-x64)

       33 files  ±0         33 suites  ±0   34m 51s ⏱️ + 1m 42s
10 183 tests +2  10 183 ✔️ +2  0 💤 ±0  0 ±0 
12 398 runs  +2  12 398 ✔️ +2  0 💤 ±0  0 ±0 

Results for commit 0f4eb7b. ± Comparison against base commit 2499ee5.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 28, 2023

Test Results (linux-musl-x64)

       33 files  ±0         33 suites  ±0   31m 31s ⏱️ - 3m 33s
10 171 tests +2  10 171 ✔️ +2  0 💤 ±0  0 ±0 
12 387 runs  +2  12 387 ✔️ +2  0 💤 ±0  0 ±0 

Results for commit 0f4eb7b. ± Comparison against base commit 2499ee5.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 28, 2023

Test Results (osx-x64)

       33 files  ±0         33 suites  ±0   1h 25m 7s ⏱️ - 21m 27s
10 175 tests +2  10 175 ✔️ +2  0 💤 ±0  0 ±0 
12 391 runs  +2  12 391 ✔️ +2  0 💤 ±0  0 ±0 

Results for commit 0f4eb7b. ± Comparison against base commit 2499ee5.

♻️ This comment has been updated with latest results.

@jeskew jeskew enabled auto-merge (squash) July 28, 2023 18:18
@jeskew jeskew merged commit 7bcc498 into main Jul 28, 2023
52 checks passed
@jeskew jeskew deleted the jeskew/make-decorators-order-independent branch July 28, 2023 20:41
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.

Make decorators order-independent
2 participants