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

Scanning for extensions may write dll paths to console #1258

Closed
ArturDorochowicz opened this issue Jan 30, 2025 · 2 comments · May be fixed by #1259
Closed

Scanning for extensions may write dll paths to console #1258

ArturDorochowicz opened this issue Jan 30, 2025 · 2 comments · May be fixed by #1259
Labels
wontfix This will not be worked on

Comments

@ArturDorochowicz
Copy link

When my application, which uses SqlClient, starts, I'm getting these mysterious dll paths as the first output on the console:

[redacted]\runtimes\win-arm\native\Microsoft.Data.SqlClient.SNI.dll
[redacted]\runtimes\win-arm64\native\Microsoft.Data.SqlClient.SNI.dll
[redacted]\runtimes\win-x64\native\Microsoft.Data.SqlClient.SNI.dll
[redacted]\runtimes\win-x86\native\Microsoft.Data.SqlClient.SNI.dll

I think this comes from this code:

_extensions = AssemblyFinder
.FindAssemblies(msg => Console.WriteLine(msg), a => a.HasAttribute<WolverineModuleAttribute>(), false)
.Concat(AppDomain.CurrentDomain.GetAssemblies())
.Distinct()
.Where(a => a.HasAttribute<WolverineModuleAttribute>())
.ToArray();

After reading the code, I understand why these specific dlls are logged, but I don't think this console output is productive in its current form or at all. As a user of Wolverine, this did not tell me anything helpful and only lead to questioning what was happening.

I suggest this output is removed.

@jeremydmiller
Copy link
Member

So, three things:

  1. Sorry for the inconvenience
  2. You can happily disable the Wolverine module auto-discovery as shown here: https://wolverinefx.net/guide/extensions.html#disabling-assembly-scanning
  3. It's just not going to be a high priority for the wolverine team to change this, but we're happy to have a PR to do that.

@jeremydmiller jeremydmiller added the wontfix This will not be worked on label Jan 30, 2025
@ArturDorochowicz
Copy link
Author

ArturDorochowicz commented Jan 31, 2025

Will you accept a PR that simply removes Console.WriteLine from there?

Edit: created #1259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants