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

Feat: Implements design in Azure/bicep-reps/pull/5 #13537

Merged
merged 2 commits into from Mar 5, 2024

Conversation

asilverman
Copy link
Contributor

@asilverman asilverman commented Mar 5, 2024

Microsoft Reviewers: Open in CodeFlow

Azure/bicep-reps#5

@asilverman asilverman added the story: dynamic type loading Collects all work items related to decoupling of Bicep types from compiler label Mar 5, 2024
@asilverman asilverman added this to the v0.27 milestone Mar 5, 2024
@asilverman asilverman self-assigned this Mar 5, 2024
@asilverman asilverman changed the title Feat: Implements design in https://github.com/Azure/bicep-reps/pull/5 Feat: Implements design in Azure/bicep-reps/pull/5 Mar 5, 2024
Copy link
Contributor

github-actions bot commented Mar 5, 2024

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

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

Copy link
Contributor

github-actions bot commented Mar 5, 2024

Test Results

    66 files   -     33      66 suites   - 33   21m 35s ⏱️ - 22m 18s
10 675 tests  -     22  10 674 ✅  -     22  1 💤 ±0  0 ❌ ±0 
25 240 runs   - 12 622  25 238 ✅  - 12 621  2 💤  - 1  0 ❌ ±0 

Results for commit 6d061b4. ± Comparison against base commit b41394e.

@asilverman asilverman merged commit 3a300e5 into main Mar 5, 2024
44 checks passed
@asilverman asilverman deleted the asilverman/central-mgmt-providers branch March 5, 2024 22:56
anthony-c-martin added a commit that referenced this pull request Apr 3, 2024
This PR builds on top of #13078, #13542 and #13537 to complete the
implementation of "implicit" providers - e.g. giving the user the
ability to control which providers are available and imported by default
fully through the bicepconfig file.

## Example
Given the following bicepconfig file:
```json
{
  "providers": {
    "az": "builtin:",
    "foo": "br:example.azurecr.io/providers/foo:1.2.3"
  },
  "implicitProviders": ["foo"],
}
```
And `.bicep` files will now have `foo` restored from the registry, and
imported by default. In this example, `az` is *not* imported by default,
and would require an explicit `provider az` in any file wishing to use
it.

## Changes
* Implicit providers are fully supported in the restoration flow, and
errors are surfaced.
* The `DefaultNamespaceProvider` has been replaced with a purely
config-driven equivalent (`NamespaceProvider`). This also introduces a
stricter separation between `NamespaceProvider` (returns a list of
available namespace types including diagnostics), and
`NamespaceResolver` (take the list of available namespaces, and can be
queried to provide information about what is/isn't in scope - e.g. for
binding).
* Improve some of the diagnostics in error cases, add tests.
* Existing functionality should be unaffected.

## Outstanding issues
* Implicit providers introduce places where diagnostics can be surfaced
without a syntax to attach to. Some of the errors will need to be
updated to clarify the source of the problem (bicep config).
###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/Azure/bicep/pull/13725)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
story: dynamic type loading Collects all work items related to decoupling of Bicep types from compiler
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants