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

EnC: Adding public method to a library and invoking it within the same edit session #68293

Closed
tmat opened this issue May 22, 2023 · 3 comments
Closed
Labels
Area-Interactive Interactive-EnC Test-Scenario End-to-end test scenario to be tested manually untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@tmat
Copy link
Member

tmat commented May 22, 2023

Fails on .NET Framework and .NET 8 Preview 3. Fixed in .NET 8 Preview 4.

Repro

  1. Unzip Repro.zip and open the solution in VS.
  2. F10
  3. Uncomment definition of method H in Class1.cs and call c.H(); in Program.cs.
  4. F5

Expected output

1
2

Method H is not executed.

Actual output

1

Method H is executed.

@tmat tmat added Interactive-EnC Test-Scenario End-to-end test scenario to be tested manually labels May 22, 2023
@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Interactive untriaged Issues and PRs which have not yet been triaged by a lead labels May 22, 2023
@tmat
Copy link
Member Author

tmat commented May 22, 2023

Generated deltas:

Deltas.zip

@tmat
Copy link
Member Author

tmat commented May 22, 2023

@AaronRobinsonMSFT

@mikelle-rogers
Copy link
Member

@tmat, when I use the latest Visual Studio and .NET 8, I get the expected output.

lambdageek added a commit to lambdageek/runtime that referenced this issue Jun 7, 2023
dotnet/roslyn#68293 we get an error if we
add a generic field and try to use it during the same edit.
workaround is to do two separate edits
@tmat tmat closed this as completed Jun 13, 2023
lambdageek added a commit to dotnet/runtime that referenced this issue Jun 16, 2023
…ields to generic classes (#87285)

Fixes #86111

* new test adding a generic field

* workaround roslyn issue to generate generic static field test

   dotnet/roslyn#68293 we get an error if we add a generic field and try to use it during the same edit. workaround is to do two separate edits

* implement hot reload for static fields in generics

   ldsflda seems to be working

* Add a generic instance add instance field test

* add reflection testing to the generic instance added field test

* fixup valuetype loads

* add non-generic valuetype ldflda test

* Mark failing tests for CoreCLR

* light up GenericAddFieldToExistingType capability

* use interp_emit_ldobj for metadata-update; add barrier if volatile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Interactive Interactive-EnC Test-Scenario End-to-end test scenario to be tested manually untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

2 participants