Skip to content

[3.0] Switch back to MSDI - #2639

Open
Exanite wants to merge 7 commits into
develop/3.0from
feature/msdi
Open

Exanite wants to merge 7 commits into
develop/3.0from
feature/msdi

Conversation

@Exanite

@Exanite Exanite commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Summary of the PR

This removes Autofac and goes back to using just MSDI

  • I confirm that I am the author of this code and release it to the Silk.NET project under the MIT license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

Related issues, Discord discussions, or proposals

Links go here.

Further Comments

Tasks

@Exanite

Exanite commented Nov 10, 2026

Copy link
Copy Markdown
Member Author

/bindings *

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

File Coverage
All files 22% ✅

Minimum allowed coverage is 0%

Generated by 🐒 cobertura-action against 608e97e

@github-actions

Copy link
Copy Markdown
Contributor

Silk.NET bindings regeneration reminder

Some of the bindings are likely affected by this PR.
Please regenerate these by posting a comment with /bindings OpenAL OpenCL OpenGL OpenXR SDL Vulkan.

If you believe this to be in error, then please write a comment explaining why and ignore this reminder.

Comment on lines +82 to +87
// Create all jobs
var jobs = _jobDefinitions.ToDictionary(
jobKvp => jobKvp.Key,
jobKvp =>
{
return new SilkTouchJob(

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Side effect of needing to ask mods for the command lines is that you have to create all jobs/mods up front. This is arguably fine since jobs/mods are lightweight until they run.

/// <summary>
/// Dependencies defined here will be available to jobs.
/// </summary>
private void ConfigureForward(IServiceProvider host, IServiceCollection services)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

MSDI requires explicit forwarding since no parent/child container support.

Comment thread Directory.Packages.props
<PackageVersion
Include="Microsoft.CodeAnalysis.PublicApiAnalyzers"
Version="5.0.0-1.25277.114"
/>

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Just CSharpier reformatting outside of removing Autofac here.


builder.SetMinimumLevel(ctx.ParseResult.GetValueForOption(LoggingOption));
// This avoids depending on the CLI options during container building
builder.AddFilter(IsLogLevelEnabled);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We can't set the default minimum level using SetMinimumLevel anymore since that depends on the CLI args and the container is built before CLI args are parsed now.

This seems to be the only way to do it.

@Exanite
Exanite marked this pull request as ready for review November 11, 2026 05:34
@Exanite
Exanite requested a review from a team as a code owner November 11, 2026 05:34
@Exanite

Exanite commented Nov 11, 2026

Copy link
Copy Markdown
Member Author

/bindings *

@Exanite
Exanite marked this pull request as draft November 11, 2026 06:08
@Exanite
Exanite marked this pull request as ready for review November 11, 2026 19:13

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant