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

Add explicit support for assembly aliases #294

Merged
merged 3 commits into from
Nov 13, 2024

Conversation

dupdob
Copy link
Contributor

@dupdob dupdob commented Nov 12, 2024

🚀 Support Assembly Aliases

Description

This PR adds explicit support for assembly aliases, that is the ability to add a prefix (an alias) to the namespace(s) of one or more assemblies in order to deal with name conflict.

This PR adds a ReferenceAliases property to IAnalyzerResult interface. This property exposes a dictionary providing the list of aliases for every aliased references. If a referenced assembly is not aliased, it will not be listed in this dictionary.

This property is also used for Roslyn Workspace building.

Tests

A dedicated test project (SdkNet8Alias) has been added and is used in integration tests and workspace tests.

Copy link
Contributor

@Corniel Corniel left a comment

Choose a reason for hiding this comment

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

LGTM

@dupdob dupdob marked this pull request as draft November 12, 2024 15:53
@phmonte
Copy link
Owner

phmonte commented Nov 12, 2024

@dupdob Once we get the draft out, we can do the merge

@dupdob
Copy link
Contributor Author

dupdob commented Nov 12, 2024

Thanks
I put it in draft because one of the test was failing. I wanted to include an alias project reference, but it turns out it does not work for integration tests: the dependent assemblies are not built, hence not available in the workspace.
So I removed it, and everything is green again.

PR no longer in Draft

@dupdob dupdob marked this pull request as ready for review November 12, 2024 22:13
@phmonte phmonte merged commit 28cf9aa into phmonte:main Nov 13, 2024
6 checks passed
@rouke-broersma
Copy link

@phmonte think you could find some time to release this in the near future? We could use this feature in stryker

@phmonte
Copy link
Owner

phmonte commented Nov 13, 2024

@rouke-broersma yes, I can generate a new version today.

@phmonte
Copy link
Owner

phmonte commented Nov 16, 2024

@rouke-broersma @Corniel and @dupdob

I'm having a compatibility issue between versions (which was expected). I'm analyzing it carefully so that we don't have any surprises.

I plan to publish the new version this weekend.

@phmonte
Copy link
Owner

phmonte commented Nov 16, 2024

New version published 7.1.0, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants