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

ApiCompatibility.AssemblySymbolLoader design should be revisited #16919

Open
safern opened this issue Apr 14, 2021 · 0 comments
Open

ApiCompatibility.AssemblySymbolLoader design should be revisited #16919

safern opened this issue Apr 14, 2021 · 0 comments

Comments

@safern
Copy link
Member

safern commented Apr 14, 2021

The current model for AssemblySymbolLoader is that you create an instance of the object and then that object keeps track of the loaded assemblies and search paths. Also, the IEnumerable<IAssemblySymbol> LoadAssemblies APIs run synchronously and don't do this load lazily. The reason to do that synchronously is because it has a HasLoadWarnings(out IEnumerable<string> warnings) api, and when loading assemblies it populates that array. However that array is stored for the life time of the object and if you call multiple times LoadAssemblies it would return the aggregate of warnings found.

Also, we might be able to do a lazy loading of the assemblies using the enumerator model if that meets the customer expectations.

Some options for the context is having the user pass down a context as a parameter, that way we don't have customers accidentally cross the context boundaries and get the assembly that was previously loaded when they wanted a new assembly (assemblies are cached by name).

Also the way we are loading references might need to be improved: #16817 (comment)

cc: @ericstj @Anipik

@safern safern added this to the 6.0.1xx milestone Apr 14, 2021
@safern safern self-assigned this Apr 14, 2021
@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged Request triage from a team member label Apr 14, 2021
@safern safern removed the untriaged Request triage from a team member label Apr 14, 2021
@ericstj ericstj modified the milestones: 6.0.1xx, 7.0.1xx Jan 26, 2022
@safern safern removed their assignment Feb 12, 2022
@ViktorHofer ViktorHofer modified the milestones: 7.0.1xx, Backlog Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants