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

Tokens that reference generated assembly members not populated properly #107658

Closed
buyaa-n opened this issue Sep 10, 2024 · 1 comment · Fixed by #107661
Closed

Tokens that reference generated assembly members not populated properly #107658

buyaa-n opened this issue Sep 10, 2024 · 1 comment · Fixed by #107661
Labels
area-System.Reflection.Emit in-pr There is an active PR which will close this issue when it is merged
Milestone

Comments

@buyaa-n
Copy link
Contributor

buyaa-n commented Sep 10, 2024

Steps for repro:

  1. Say you create 2 assemblies, and 1 depend on another. B depends on A.
  2. You create A
  3. You create B, calls a method in A
  4. You save A
  5. You save B (kaboom)

B references a MethodBuilderImpl in A. The module scopename refers to the correct filename, but Name says "<In Memory Module>". When emitted, it strangely emits the static constructor of the class I am calling from in B.

This scenario works correctly on .NET 2/4. And if I rememebr correctly it even allows for cyclic references where A and B can both reference each other.

Originally posted by @leppie in #92975 (comment)

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Sep 10, 2024
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Sep 10, 2024
@buyaa-n buyaa-n added this to the 9.0.0 milestone Sep 10, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label Sep 10, 2024
@buyaa-n buyaa-n added area-System.Reflection.Emit and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Sep 10, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-reflection-emit
See info in area-owners.md if you want to be subscribed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Reflection.Emit in-pr There is an active PR which will close this issue when it is merged
Projects
None yet
1 participant