Use Roslyn WatchHotReloadService #65
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of using reflection to call deep into the Roslyn EnC feature, instead call the high-level WatchHotReloadService.
Still need to use reflection because the class is internal, but the service encapsulates most of the complicated details, so we don't have to. As a result delete a lot of dead code.
A nice benefit is that the roslyn debug information is properly initialized:
https://github.com/dotnet/roslyn/blob/fd67237da22ead61eba09734375d6dea791b0db8/src/Features/Core/Portable/EditAndContinue/DebuggingSession.cs#L403-L407
As a result, roslyn can generate EnCLogs for functions that contain lambdas that preserve the identity of the lambda instead of emitting new fields and methods for the closure.
Unrelated bugfix the frontend programs weren't returning the exit code. Now they do. So if the library returns with a non-zero exit code we actually exit with that exit code.
Bump version to 1.0.2 - this change is worth it.