-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Do not use ALC name for AssemblyName #82754
Conversation
Tagging subscribers to this area: @dotnet/area-system-reflection Issue DetailsDispatchProxy uses Reflection.Emit internally and used to use only one In .NET 7 that fixed with #62095, now it creates a separate In some cases, ALC name could include a path:
AssemblyName constructor and throws.
With this PR we are just using the same name for each ALC, we might want to pass the AssemblyLoadContext.Name as @KalleOlaviNiemitalo suggested for debugging purpose, but ALC info probably should be passed/solved appropriately with #62234 instead, or if needed we can update accordingly later. See more details from #80387
|
@elinor-fung and @vitek-karas FYI |
The failure is unrelated and known |
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/4295951511 |
@buyaa-n backporting to release/7.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Do not use ALC name for AssemblyName
Using index info to reconstruct a base tree...
M src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs
M src/libraries/System.Reflection.DispatchProxy/tests/DispatchProxyTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/System.Reflection.DispatchProxy/tests/DispatchProxyTests.cs
CONFLICT (content): Merge conflict in src/libraries/System.Reflection.DispatchProxy/tests/DispatchProxyTests.cs
Auto-merging src/libraries/System.Reflection.DispatchProxy/src/System/Reflection/DispatchProxyGenerator.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Do not use ALC name for AssemblyName
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@buyaa-n an error occurred while backporting to release/7.0, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
DispatchProxy uses Reflection.Emit internally and used to use only one
AssemblyBuilder
for all proxy types.In .NET 7 that fixed with #62095, now it creates a separate
AssemblyBuilder
, for eachAssemblyLoadContext
of the proxy type and also used the ALC name for creatingAssemblyName
In some cases, ALC name could include a path:
runtime/src/libraries/System.Private.CoreLib/src/System/Reflection/Assembly.cs
Line 273 in ccbcb7f
AssemblyName
constructor and throws.With this PR we are just using the same name for each ALC, we might want to pass the AssemblyLoadContext.Name as @KalleOlaviNiemitalo suggested for debugging purpose, but ALC info probably should be passed/solved appropriately with #62234 instead, or if needed we can update accordingly later.
See more details from #80387