Type Providers: create a separate process for script type providers#896
Type Providers: create a separate process for script type providers#896
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.
What if two projects in a solution use conflicting packages?
There was a problem hiding this comment.
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.
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.
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
5d24fdb to
2bb4275
Compare
No description provided.