-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add a config switch to fully disable hot-reload #123744
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
base: main
Are you sure you want to change the base?
Conversation
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
| /// or the System.Reflection.Metadata.HotReloadDisabled AppContext switch set to true. | ||
| /// </summary> | ||
| internal static bool IsHotReloadDisabled => | ||
| AppContextConfigHelper.GetBooleanConfig("System.Reflection.Metadata.HotReloadDisabled", "DOTNET_HOTRELOAD_DISABLED"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be called HotReload. HotReload is the larger Visual Studio feature. The name of the runtime sub-feature is metadata updater. Can this be called System.Reflection.Metadata.MetadataUpdater.IsSupported same name as the switch used for trimming MetadataUpdater support via FeatureSwitchDefinition?
| /// Returns true if hot reload is explicitly disabled via the DOTNET_HOTRELOAD_DISABLED environment variable | ||
| /// or the System.Reflection.Metadata.HotReloadDisabled AppContext switch set to true. | ||
| /// </summary> | ||
| internal static bool IsHotReloadDisabled => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have DOTNET_MODIFIABLE_ASSEMBLIES environment variable that is mean to control the set updateable assemblies. Currently, the only valid value is debug that makes all assemblies compiled as debug modifiable. Would it work to extend this env variable - e.g. recognize none as a value that makes all assemblies unmodifiable and thus disables metadata updater?
Adds a config switch that unconditionally disables metadata updater.
Fixes #78540