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

Allow usage of imports which reference user defined functions in .bicepparam files #12900

Merged
merged 3 commits into from
Jan 3, 2024

Conversation

anthony-c-martin
Copy link
Member

@anthony-c-martin anthony-c-martin commented Jan 3, 2024

Closes #12799

Microsoft Reviewers: Open in CodeFlow

Copy link
Contributor

github-actions bot commented Jan 3, 2024

Test this change out locally with the following install scripts (Action run 7403460201)

VSCode
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-vsix.sh) --run-id 7403460201
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-vsix.ps1) } -RunId 7403460201"
Azure CLI
  • Mac/Linux
    bash <(curl -Ls https://aka.ms/bicep/nightly-cli.sh) --run-id 7403460201
  • Windows
    iex "& { $(irm https://aka.ms/bicep/nightly-cli.ps1) } -RunId 7403460201"

Copy link
Contributor

github-actions bot commented Jan 3, 2024

Test Results

    64 files   -     35      64 suites   - 35   21m 27s ⏱️ - 29m 41s
10 465 tests +     6  10 465 ✅ +     8  0 💤 ±0  0 ❌  - 2 
22 668 runs   - 15 405  22 668 ✅  - 15 402  0 💤 ±0  0 ❌  - 3 

Results for commit 05028c5. ± Comparison against base commit a672a6a.

♻️ This comment has been updated with latest results.

@anthony-c-martin anthony-c-martin changed the title Testing Allow usage of imports which reference user defined functions in .bicepparam files Jan 3, 2024
@anthony-c-martin anthony-c-martin force-pushed the ant/issue12799 branch 2 times, most recently from ab93666 to 2ec07b8 Compare January 3, 2024 19:37
@anthony-c-martin anthony-c-martin enabled auto-merge (squash) January 3, 2024 19:49

return Result.For(DiagnosticBuilder.ForPosition(symbol.DeclaringImportedSymbolsListItem.OriginalSymbolName).ImportedSymbolNotFound(symbol.OriginalSymbolName ?? LanguageConstants.MissingName));
TemplateEngine.ProcessTemplateLanguageExpressions(null, null, null, template, TemplateWriter.NestedDeploymentResourceApiVersion, null);
Copy link
Contributor

@jeskew jeskew Jan 3, 2024

Choose a reason for hiding this comment

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

[nit]: I think this line could be skipped, since the compiled template will still be queried via a TemplateVariablesEvaluator that evaluates expressions as needed. But it also doesn't do any harm.

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried removing this and the scenario test started failing - leaving in for now

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.

Import of synthesized variables through user defined functions fails with BCP338
2 participants