stride3d / stride3d/stride

Use C# [ModuleInitializer]

Open
#1,836 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-Core
Dominant language
C#
Stars
7.8k
Forks
1.2k
Avg merge
2d 17h
Merged PRs (30d)
49

Description

Is your feature request related to a problem? Please describe.
C# 9 has support of [ModuleInitializer] https://learn.microsoft.com/ru-ru/dotnet/csharp/language-reference/proposals/csharp-9.0/module-initializers.
And as part of https://github.com/stride3d/stride/issues/1835 it's good idea to migrate to them.

Describe the solution you'd like
Use C# [ModuleInitializer] and get rid of ModuleInitializerProcessor stuff in AssemblyProcessor.

Describe alternatives you've considered
C# does not support order of initialization. But don't sure in disadvantages of it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating AssemblyProcessor and its ModuleInitializerProcessor code, then read the C# 9 ModuleInitializer proposal and related context in issue 1835. Done means migrating the initialization approach to [ModuleInitializer], removing the ModuleInitializerProcessor machinery, and checking how the lack of guaranteed initialization order affects current behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
build-system
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.