-
Notifications
You must be signed in to change notification settings - Fork 55
Type Providers: create a separate process for script type providers #896
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
base: main
Are you sure you want to change the base?
Conversation
ReSharper.FSharp/src/FSharp/FSharp.Common/src/Shim/TypeProviders/ExtensionTypingProviderShim.fs
Outdated
Show resolved
Hide resolved
match scope with | ||
| Solution -> | ||
SolutionTypeProvidersClient(clientLifetimeDef, connection, fcsProjectProvider, outputAssemblies, | ||
analyzeGenerativeTypeProvidersInMemory.Value) :> _ | ||
| Scripts -> | ||
ScriptTypeProvidersClient(clientLifetimeDef, connection, scriptPsiModulesProvider) :> _ |
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.
What if two projects in a solution use conflicting packages?
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.
The problem is similar, but a solution won't even compile
2 System.Text.RegularExpressions.Regex (from System.Text.RegularExpressions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) | ||
2 System.Text.RegularExpressions.RegexOptions (from System.Text.RegularExpressions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) | ||
2 System.TimeSpan (from System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a) | ||
1 FSharp.Text.RegexProvider.Regex (from FSharp.Text.RegexProvider, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null) |
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.
Please remove this sorting by ids from test data. We should not be expecting a particular order in which FCS sends requests here.
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.
Unfortunately, it will then be impossible to easily determine which providers and types were invalidated; Ids play the role of versions here. Types can also have the same name, but they can be generated in different environments and differ in content.
In this case, it's not just sorting: previously, two types of FSharp.Text.RegexProvider.Regex
lived in one process, one generated by the provider from the solution, and the other from the script. Now scripts are in a separate process, and there is only one FSharp.Text.RegexProvider.Regex
there. In this case, the gold predictably changed and showed the changes
…rs/ExtensionTypingProviderShim.fs Co-authored-by: Eugene Auduchinok <[email protected]>
No description provided.