dotnet / dotnet/macios

Make sure the trimmable static registrar doesn't modify user assemblies

Open
#26,069 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 13h
Merged PRs (30d)
96

Description

In order to support Hot Reload, we can't modify user assemblies.

Unfortunately our non-dynamic registrars are designed around modifying assemblies... so we need to make sure there's a way to not modify assemblies when using the trimmable static registrar (we only care about this one + the dynamic one, because all the other static registrars are going to be unnecessary and eventually removed).

Task:

* [ ] Identify steps that modify user assemblies.
* [ ] PreserveSmartEnumConversionStep is one: https://github.com/dotnet/macios/blob/a92fbe4b82814678d90847303735fc1df41f1863/tools/dotnet-linker/PreserveSmartEnumConversionsStep.cs#L37-L38
* [ ] Others?
* [ ] Design a solution for each case.
* [ ] Implement said solutions.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with PreserveSmartEnumConversionsStep.cs at the linked lines and trace how the trimmable static registrar processes user assemblies. Identify other steps that modify those assemblies, then review the registrar and linker entry points involved. Done means each modification path has a designed and implemented alternative that preserves user assemblies for Hot Reload.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.