Skip to content

Conversation

@stephentoub
Copy link
Member

@stephentoub stephentoub commented Apr 14, 2021

Contributes to #50938
cc: @mikem8361, @tommcdon, @pranavkm, @lambdageek

Note per our offline conversation, I changed the BeforeUpdate argument to be Type[] instead of Type.

@stephentoub stephentoub force-pushed the reflectioncacheupdate branch from a93f642 to eb90394 Compare April 14, 2021 16:10
@stephentoub stephentoub force-pushed the reflectioncacheupdate branch from 03a59e1 to ea417e9 Compare April 15, 2021 00:14
@stephentoub stephentoub merged commit c42d26c into dotnet:main Apr 15, 2021
@stephentoub stephentoub deleted the reflectioncacheupdate branch April 15, 2021 03:14
@devsko
Copy link
Contributor

devsko commented Apr 17, 2021

Hi @stephentoub . Is my understanding correct that after

  • adding a field to a Class in a loaded assembly via hot reload in a way very similar to what dotnet-watch does
  • calling RuntimeTypeMetadataUpdateHandler.BeforeUpdate(null) via reflection
  • calling typeof(Class).GetFields()

the added field should be in the result?
Because it isn't

@stephentoub
Copy link
Member Author

@mikem8361, @tommcdon, the above will need investigation. The RuntimeTypeCache is correctly being cleared, and new methods and properties added with ApplyUpdate are correctly showing up via reflection after an update, but fields are not.

@devsko
Copy link
Contributor

devsko commented Apr 19, 2021

Thanks for looking into this

@ghost ghost locked as resolved and limited conversation to collaborators May 19, 2021
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants