-
Notifications
You must be signed in to change notification settings - Fork 816
Fix #18441 #18459
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
Fix #18441 #18459
Conversation
❗ Release notes requiredCaution No release notes found for the changed paths (see table below). Please make sure to add an entry with an informative description of the change as well as link to this pull request, issue and language suggestion if applicable. Release notes for this repository are based on Keep A Changelog format. The following format is recommended for this repository:
If you believe that release notes are not necessary for this PR, please add NO_RELEASE_NOTES label to the pull request. You can open this PR in browser to add release notes: open in github.dev
|
@@ -63,6 +64,15 @@ module Test2 = | |||
Assert.Equal(typeof<string>, value2.ReflectionType) | |||
Assert.Equal("Execute - Test2.test2 - 27", value2.ReflectionValue :?> string) | |||
|
|||
[<Theory>] |
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 looks more like a bcl test case than one interesting to us.
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.
Yep, I'll remove it.
@majocha --- The magic resolver is the beating heart of FSI's #r feature, so I would only ever tweak it, and be terrified while doing it. The main issue with tweaking it are that it supports, desktop framework assembly resolution and coreclr assembly resolution. That the tests work is not that great a validation, we don't do a ton of FSI testing, and what we do, doesn't do a lot of assembly resolution. So I would avoid making changes to it if I could. The trouble with saying what I just did, is I will then search for "the solution" you should ask @vzarytovskii how easy I am to nerd snipe. Needless to say I am easy, he and Tomas used to do it to me all of the time. The problem you identified is that when multiemit + and - are mixed in process, there is not a good way of distinguishing between the "in memory "Builder" version of the assembly, which is what the Simple name resolution is for, and the multi-emit versioned version which is what the fullname is for. I think the fix is to change the name of the generated assembly for one of the scenarios something more like this: https://github.com/dotnet/fsharp/pull/18465/files I haven't done a lot of testing on it, but I think this is the right fix. Although we need to have a discussion, about whether we even need multiemit- any longer. I can easily see us choosing to drop it in NET10. Thanks for looking at this Kevin |
Awesome, that looks like a safe fix. Thanks Kevin! |
Thanks mate, Kevin |
This fix is maybe better than my previous attempt (#18443).
The problem is the same as #16118. It still happens when one session is multi-emit and the other uses legacy
AssemblyBuilder
.This solution is basically same as original solution #16139: don't do simple name binding even for single-emit.
The risk is that I don't know why there was a need of resolving "FSI-ASSEMBLY" by simple same in the first place.
The code for it was there forever but it doesn't look like it is used anymore. The tests pass without it.
@KevinRansom, please take a look if it makes sense.