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

A change in a top-level statement or an addition of a new top-level statement is not picked up by ENC #44196

Closed
AlekseyTs opened this issue May 12, 2020 · 9 comments · Fixed by #54102

Comments

@AlekseyTs
Copy link
Contributor

AlekseyTs commented May 12, 2020

image

Debugger simply ignores new code afterwards. It is quite possible that "rude" edits detection isn't quite working.

Relates to #43563 (test plan for "top-level statements")

@tmat
Copy link
Member

tmat commented May 12, 2020

No top-level code edits will work without explicit support for the feature in Edit and Continue impl. It is also possible that EnC is broken when editing non-top-level code (e.g. a top-level class) when top-level code is present. This will need both compiler and IDE work.

@tmat tmat added the Area-IDE label May 12, 2020
@AlekseyTs
Copy link
Contributor Author

Indeed, editing regular code in the file with top-level statements has the same issue.

@AlekseyTs
Copy link
Contributor Author

@tmat It is quite possible that EnC is broken for RoslynDeployment. I ran into similar issues with a program that doesn't have top-level statements.

@tmat
Copy link
Member

tmat commented May 19, 2020

Just occurred to me... are you using master-vs-deps? EnC does not work in master since it requires the latest VS bits.

@AlekseyTs
Copy link
Contributor Author

No, I am trying bits from features/SimplePrograms branch, which is almost up to date with master.

@tmat
Copy link
Member

tmat commented May 19, 2020

That explains. For end-to-end testing you'd need 1) branch off of master-vs-deps 2) make changes in the IDE to support statement diffing in top-level code.
I can do the IDE work once your branch merges to master. The compiler side work only needs unit testing similar to what's done for other features in Compilers\CSharp\Test\Emit\Emit\EditAndContinue\EditAndContinueTests.cs.

@AlekseyTs
Copy link
Contributor Author

@tmat Just an FYI, the feature has been merged into master

@tmat
Copy link
Member

tmat commented Jun 1, 2020

Thanks!

@pranavkm
Copy link
Contributor

We are looking at expanding hot reload to support changes to an ASP.NET Core's bootstrapping code. Starting in 6.0, we're going to push a minimal hosting solution that relies on top level statements - dotnet/aspnetcore#30354. Fixing this would unblock this scenario.

FYI @davidfowl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants