-
Notifications
You must be signed in to change notification settings - Fork 0
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
WIP nameof function #3
Conversation
name: 'storage123' | ||
} | ||
|
||
var name = nameof(myStorage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fails as the name variable is marked for inlining while it should be produced.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you know if the ReturnResultBuilder
delegate is failing due to inlining, or is it the Evaluator
delegate? If it's the latter, you may be able to address by omitting the Evaluator
altogether (like we do for loadJsonContent
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as I wrote on the chat, now I'm thinking that perhaps it does not matter if an unused variable if not present in the output template 🤔 maybe eventually we will do some tree shaking to remove such unnecessary code so it would not work anyway. probably if I change var name
to output name string
this will work.
Test Results 66 files 66 suites 25m 16s ⏱️ For more details on these failures, see this check. Results for commit b587cba. |
}; | ||
if (x is null) | ||
{ | ||
return new(ErrorType.Create(DiagnosticBuilder.ForPosition(call.Arguments[0]).CompileTimeConstantRequired())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not the exact error that will be raised, I'm just producing something to get glimpse if it's working or not.
7c4a87b
to
75ef620
Compare
Dotnet Test Results 72 files - 36 72 suites - 36 23m 13s ⏱️ - 8m 43s For more details on these failures, see this check. Results for commit 754050d. ± Comparison against base commit 3863bf7. ♻️ This comment has been updated with latest results. |
75ef620
to
3863bf7
Compare
Contributing a Pull Request
If you haven't already, read the full contribution guide. The guide may have changed since the last time you read it, so please double-check. Once you are done and ready to submit your PR, run through the relevant checklist below.
Contributing to documentation
Contributing an example
We are integrating the Bicep examples into the Azure QuickStart Templates. If you'd like to contribute new example
.bicep
files that showcase abilities of the language, please follow these instructions to add them directly there. We can still take bug reports and fixes for the existing examples for the time being.dotnet test
Contributing a feature
Contributing a snippet
I have a snippet that is either a single, generic resource or multi resource that uses parent-child syntax
I have checked that there is not an equivalent snippet already submitted
I have used camelCasing unless I have a justification to use another casing style
I have placeholders values that correspond to their property names (e.g.
dnsPrefix: 'dnsPrefix'
), unless it's a property that MUST be changed or parameterized in order to deploy. In that case, I use 'REQUIRED' e.g. keyDataI have my symbolic name as the first tab stop ($1) in the snippet. e.g. res-aks-cluster.bicep
I have a resource name property equal to "name"
If applicable, I have set the
location
property tolocation: /*${<id>:location}*/'location'
(notresourceGroup().location
) where<id>
is a placeholder id, and addedparam location string
to the test's main.bicep file so that the resulting main.combined.bicep file used in the tests compiles without errorsI have verified that the snippet deploys correctly when used in the context of an actual bicep file
e.g.