Azure / Azure/bicep

Refactor `ApiVersionProvider` so that its fetched from a language server cache instead of being recreated each time

Open
#10,836 3 comments 0 reactions 2 assignees Claimed by @shenglol View on GitHub
tech debt
Dominant language
Bicep
Stars
3.6k
Forks
830
Avg merge
1d 2h
Merged PRs (30d)
79

Description

## Description
As part of the changes related to the dynamic loading of azure resource types we refactored the `ApiVersionProvider` instantiation from being a singleton (based on the embedded types) to being recreated on each creation of the SemanticModel (see below)
![image](https://github.com/Azure/bicep/assets/9611108/f0453dfd-ce22-4711-a656-100eb35a3043)

This is undesirable since we can probably have a singleton cache that can serve this and other type information instead of rebuilding the type system each time. This capability seems like a necessary capability to maintain the performance of our compiler and enhance the customer experience.

@shenglol had an idea on creating a feature for this, leaving this issue as a placeholder and a means for us to record that idea and discuss if we want to prioritize its implementation.

## Idea Description

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.