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

Mark the gfoidl.Analyzers dependency as a private asset #153

Closed
ycrumeyrolle opened this issue Apr 7, 2020 · 6 comments · Fixed by #154
Closed

Mark the gfoidl.Analyzers dependency as a private asset #153

ycrumeyrolle opened this issue Apr 7, 2020 · 6 comments · Fixed by #154
Assignees
Milestone

Comments

@ycrumeyrolle
Copy link
Contributor

The gfoidl.Analyzers may generates a lots of undesired warnings when the package gfoidl.Base64 is in other projects.
On my project, this is generating 184 warnings :(
May be the attribute PrivateAssets on the package will fix the issue ?

@ycrumeyrolle
Copy link
Contributor Author

Wondering if the same could be applyied to LocalsInit.Fody (is it a dev depedency?)

@gfoidl gfoidl added this to the v1.1.0 milestone Apr 7, 2020
@gfoidl gfoidl self-assigned this Apr 7, 2020
@gfoidl
Copy link
Owner

gfoidl commented Apr 7, 2020

On my project, this is generating 184 warnings :(

Oh, this was not my intention. Sorry.

Wondering if the same could be applyied to LocalsInit.Fody (is it a dev depedency?)

Makes sense.

gfoidl.Analyzers

The purpose is that the "internal" encoders aren't access directly, they should be accessed via Base64.Default or Base64.Url.
To allow the JIT to devirtualize them, they need to be public.

I'll have a look on how to fix this. Maybe this analyzer should just look at the specific namespace, so any other code won't be considered.

Thanks for reporting!

@ycrumeyrolle
Copy link
Contributor Author

Maybe this analyzer should just look at the specific namespace, so any other code won't be considered.

👍

@gfoidl
Copy link
Owner

gfoidl commented Apr 7, 2020

Wondering if the same could be applyied to LocalsInit.Fody (is it a dev depedency?)

Interesting, it's already set:

<PackageReference Include="Fody" Version="6.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>

Is there something missing? Do you have any clue therefore?

@gfoidl
Copy link
Owner

gfoidl commented Apr 7, 2020

To my last comment: That's Fody and not LocalsInit.Fody. So please ignore this comment.

@gfoidl
Copy link
Owner

gfoidl commented Apr 8, 2020

The part for the analyzer is tracked in gfoidl/Analyzers#4

@gfoidl gfoidl mentioned this issue Apr 8, 2020
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 a pull request may close this issue.

2 participants