Skip to content

Conversation

DedSec256
Copy link
Collaborator

No description provided.

@DedSec256 DedSec256 marked this pull request as ready for review August 22, 2025 05:55
@DedSec256 DedSec256 requested a review from auduchinok September 4, 2025 14:38
Comment on lines +83 to +88
match scope with
| Solution ->
SolutionTypeProvidersClient(clientLifetimeDef, connection, fcsProjectProvider, outputAssemblies,
analyzeGenerativeTypeProvidersInMemory.Value) :> _
| Scripts ->
ScriptTypeProvidersClient(clientLifetimeDef, connection, scriptPsiModulesProvider) :> _
Copy link
Member

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?

Copy link
Collaborator Author

@DedSec256 DedSec256 Sep 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dotnet/fsharp#11135

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)
Copy link
Member

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.

Copy link
Collaborator Author

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants