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

Use languageVersion 2.0 if types or functions are imported via wildcard #12898

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

jeskew
Copy link
Contributor

@jeskew jeskew commented Jan 3, 2024

Resolves #12897

Bicep should be targeting languageVersion 2.0 if any types or functions are imported, but the current check will miss cases where those imports are performed using a wildcard (import * as foo...) instead of by name (import {foo, bar} from ...). The check looks at a model's symbol table, and wildcard imports create a different kind of symbol.

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 7399170067)

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

Copy link
Contributor

github-actions bot commented Jan 3, 2024

Test Results

    66 files   -     30      66 suites   - 30   24m 48s ⏱️ - 27m 18s
10 445 tests  -     14  10 444 ✅  -     15  0 💤 ±0  1 ❌ +1 
25 385 runs   - 12 682  25 384 ✅  - 12 683  0 💤 ±0  1 ❌ +1 

For more details on these failures, see this check.

Results for commit b6bd501. ± Comparison against base commit b51a3b1.

Copy link
Member

@anthony-c-martin anthony-c-martin left a comment

Choose a reason for hiding this comment

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

Thanks for jumping on this!

@jeskew jeskew enabled auto-merge (squash) January 3, 2024 15:25
@jeskew jeskew merged commit 63fcc71 into main Jan 3, 2024
43 of 44 checks passed
@jeskew jeskew deleted the jeskew/12897 branch January 3, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants