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

Replace ServiceAttribute inclusion via targets with source generator #14

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

kzu
Copy link
Contributor

@kzu kzu commented Sep 28, 2022

The brokenness on the transitivity of contentFiles is tricky to overcome, and proved more complicated to also maintain and test in various scenarios than simply reading the same project property we have now, and skip adding the static contents of the file via the source generator itself instead.

Renamed IncludeServiceAttribute to AddServiceAttribute for consistency. Added backs compat just in case.

Fixes #12

@kzu kzu enabled auto-merge (rebase) September 28, 2022 13:30
@kzu kzu force-pushed the dev/attrgenerator branch 2 times, most recently from b7edfab to 53e5b2d Compare September 28, 2022 15:11
The brokenness on the transitivity of contentFiles is tricky to overcome, and
proved more complicated to also maintain and test in various scenarios than
simply reading the same project property we have now, and skip adding the
static contents of the file via the source generator itself instead.

Adding a way to exclude the attribute is superfluous, so we just remove
that option. Users can always have their own attribute in any namespace.
Hopefully one day the [Service] attribute does come built-in the DI asm.

Fixes #12
@kzu kzu merged commit b164618 into main Sep 28, 2022
@kzu kzu deleted the dev/attrgenerator branch September 28, 2022 15:19
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.

Replace ServiceAttribute.cs inclusion via targets with source generator-based one
1 participant