Skip to content
This repository has been archived by the owner on Dec 12, 2020. It is now read-only.

Provide distinct Usings for final generated compliation unit #232

Closed
wants to merge 1 commit into from

Conversation

stevenknox
Copy link

When using multiple different generators that have an overlap of Using Directives , the resulting consumer project may get a CS0105 warning "The using directive for 'Foo' appeared previously in this namespace"

I have applied Distinct() to ensure there are no duplicates in the final generated compilation.

Copy link
Owner

@AArnott AArnott left a comment

Choose a reason for hiding this comment

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

Often in Roslyn's OM, the types don't override the Equals method with by-value semantics. Have you confirmed that this change is effective across multiple generators mentioned in your scenario? If so, it looks good.

@stevenknox
Copy link
Author

Perfect! ill get a test added for this first thing in the morning =)

@AArnott
Copy link
Owner

AArnott commented Dec 11, 2020

This project is getting archived in favor of Source Generators. See #229

@AArnott AArnott closed this Dec 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants