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

update version-finding algorithm to probe packs dir as well as runtime dir #556

Merged
merged 1 commit into from
Feb 19, 2020

Conversation

baronfel
Copy link
Contributor

There are two phases to finding the complete set of .net core refs for typechecking:

  • discovering SDK and runtime versions,
  • using those versions to probe for dlls

The previous logic would check for runtime versions only in the shared runtime implementation directory (dotnet-root/shared/Microsoft.NETCore.App), but then it would use that discovered runtime version when probing across the reference-assembly and implementation directories. This would result in a mismatch when the reference-assembly directory existed, but the version found in the implementation directory had no match in the reference-assembly directory. As an example, think runtime version 3.1.1, which from a reference-assembly perspective is binary-compatible with the 3.1.0 reference assemblies.

This situation happens when there's not an updated set of façades for the runtime when a new runtime version is shipped, which I would expect to be the case for patch versions like 3.1.1.

@@ -149,21 +149,21 @@ module Environment =

/// because 3.x is the minimum SDK that we support for FSI, we want to float to the latest
/// 3.x sdk that the user has installed, to prevent hard-coding.
let latest3xSdkVersion sdkRoot =
let latest3xSdkVersion dotnetRoot =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed these parameters to reflect their true purpose. SDK root in the current lingo means dotnet-root/sdk, but what was passed in to these functions is the dotnet-root.

@Krzysztof-Cieslak Krzysztof-Cieslak merged commit 914ce18 into ionide:master Feb 19, 2020
@baronfel baronfel deleted the fsirefs-runtime-mismatch branch October 21, 2021 16:47
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