-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[System.Runtime.Loader] Add hot reload test infrastructure #51144
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
@tommcdon @mikem8361 So here's the general shape of how I think hot reload tests should look. @akoeplinger @ViktorHofer I really need help setting up arcade stuff for https://github.com/dotnet/hotreload-utils - the end state is that I'd like for @akoeplinger @ViktorHofer I also will need some help with CI. The tests depend on some environment variable being set ( |
Tagging subscribers to this area: @dotnet/runtime-infrastructure Issue DetailsAdding infrastructure for hot reload testing. For each test we define a new library assembly project. The The main testsuite references all the test assemblies, and when a test runs, it Dependencies:
Needs work:
To try it out locally:
(CoreCLR doesn't need
|
2394477
to
4e07d2d
Compare
One thing to note that "source build" will require the hotreload-utils repo to built as part of it. I'm not sure exactly how tools like this are handled as part of the source build. |
src/libraries/System.Runtime.Loader/tests/GenerateHotReloadDelta.targets
Outdated
Show resolved
Hide resolved
Good point. Not sure. I think the situation will be similar to how our LLVM fork, or the other transport nugets are built. (Possibly with a bit more of a bootstrapping problem since hotreload-utils depends on Roslyn which depends on the runtime) |
4e07d2d
to
6695f69
Compare
9280b69
to
374fc98
Compare
various Libraries builds are failing with
@ViktorHofer @akoeplinger is it not enough to add the reference to eng/Version.Details.xml and to .config/dotnet-tools.json? Is there something else I need to tweak? |
This comment has been minimized.
This comment has been minimized.
033eda2
to
a1a7ff0
Compare
c549c98
to
13e0c6e
Compare
src/libraries/System.Runtime.Loader/tests/GenerateHotReloadDelta.targets
Outdated
Show resolved
Hide resolved
src/libraries/System.Runtime.Loader/tests/GenerateHotReloadDelta.targets
Outdated
Show resolved
Hide resolved
src/libraries/System.Runtime.Loader/tests/GenerateHotReloadDelta.targets
Outdated
Show resolved
Hide resolved
just calling RemoteExecutor.IsSupported on wasm throws ``` System.TypeInitializationException: The type initializer for 'Microsoft.DotNet.RemoteExecutor.RemoteExecutor' threw an exception. ---> System.PlatformNotSupportedException: System.Diagnostics.Process is not supported on this platform. ```
Co-authored-by: Viktor Hofer <[email protected]>
It's for the old project style, only
…otreload-delta-gen Use an msbuild target nuget instead of the CLI tool
Don't need this anymore - using an MSBuild targets nuget now instead of a dotnet tool This reverts commit c125be86a3324d4bbcce1728b124fb0b4abd9add.
The Microsoft.DotNet.HotReload.Utils.Generator.BuildTool nuget now includes a task to compute the output names. So the targets in the nuget are entirely self-contained now - incremental builds and project references should work now. Bump to version 1.0.1 of Generator.BuildTool which has the necessary targets
a671445
to
b5b2b81
Compare
.../tests/ApplyUpdate/System.Reflection.Metadata.ApplyUpdate.Test.MethodBody1/MethodBody1_v2.cs
Show resolved
Hide resolved
.../tests/ApplyUpdate/System.Reflection.Metadata.ApplyUpdate.Test.MethodBody1/MethodBody1_v1.cs
Show resolved
Hide resolved
...der/tests/ApplyUpdate/System.Reflection.Metadata.ApplyUpdate.Test.MethodBody1/MethodBody1.cs
Show resolved
Hide resolved
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.
LGTM modulo style nits
421209b
to
b3347f2
Compare
Adding infrastructure for hot reload testing.
For each test we define a new library assembly project. The
.csproj
has aDeltaScript
property that specifies a JSON file that lists the name of aninitial source file, and a list of updated versions of that file. The
hotreload-delta-gen
tool runs during the build to read the delta script andcreate deltas that incorporate the updates.
The main testsuite references all the test assemblies, and when a test runs, it
calls
ApplyUpdateUtil.ApplyUpdate
to load subsequent deltasand then compares the results before and after an update.
Dependencies:
Microsoft.DotNet.HotReload.Utils.Generator.BuildTool
MSBuild targets nupkg on thedotnet6-transport
nuget feed.DOTNET_MODIFIABLE_ASSEMBLIES
is not set in the environment, we use remote executor to run the tests.Mono is technically enabled, but practically it's not running anywhere:
DOTNET_MODIFIABLE_ASSEMBLIES
flag via xharness (and the app builder tasks).To try it out locally with CoreCLR run:
For mono, build the runtime with
/p:MonoMetadataUpdate=true
and setenvMONO_ENV_OPTIONS=--interp