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

Module initializer #1838

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft

Module initializer #1838

wants to merge 2 commits into from

Conversation

cNoNim
Copy link
Contributor

@cNoNim cNoNim commented Sep 24, 2023

PR Details

Migrate to C# [ModuleInitializer].

Description

Remove Strice.Core.ModuleInitializerAttribute.
Import System.Runtime.CompilerServices.

Related Issue

#1836

Motivation and Context

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 #1835 it's good idea to migrate to them.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@cNoNim
Copy link
Contributor Author

cNoNim commented Sep 24, 2023

Create Draft PR for progress overview.
I think this is a breaking change.
And we need to resolve a number of issues, which I will write about a little later. Now I will prepare a separate PR with a fix for AssemblyProcessor compilation.

@IXLLEGACYIXL
Copy link
Collaborator

this is not directly needed anymore with module processor roslyn source generator
currently strides module intiializer is generated as c# module initializer

the order "can be removed "as soon as everything is source generated into that as the only order mattered was stride internal anyway

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.

2 participants