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
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asilverman
added
the
story: dynamic type loading
Collects all work items related to decoupling of Bicep types from compiler
label
Mar 5, 2024
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
Test this change out locally with the following install scripts (Action run 8164142722) VSCode
Azure CLI
|
shenglol
approved these changes
Mar 5, 2024
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Microsoft Reviewers: Open in CodeFlow
Azure/bicep-reps#5