Make ReferencedAssemblies in type provider config report correct results#1037
Merged
KevinRansom merged 1 commit intodotnet:masterfrom Apr 12, 2016
Merged
Make ReferencedAssemblies in type provider config report correct results#1037KevinRansom merged 1 commit intodotnet:masterfrom
KevinRansom merged 1 commit intodotnet:masterfrom
Conversation
This was referenced Apr 9, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This resurrects #478.
This fix should really be applied even if at some future point we do type provider type binding in a different way.
To quote the original PR:
I've been looking for what we can do to help with type-provider multi-targeting as described in #23. This is a major issue for F# type providers and, as NETCore-on-Linux comes around, we will really need to be looking at this closely. Anything we can do in F# 4.0 to help with this will be important.
As mentioned in #23 (comment), the ReferencedAssemblies field of the type provider config is missing entries for basic assemblies such as FSharp.Core. This is a mistake in the implementation of F#, and is bad, as this data is crucial to help give better multi-targeting type providers.
The underlying bug is that the ReferencedAssemblies property only includes the "non-framework" assemblies, and not "framework" assemblies such as FSharp.Core and mscorlib. (The framework v. non-frameworks distinction being referred to here is a somewhat artificial distinction made in the F# compiler to share resources between projects in the IDE in some situations
This corrects this problem by adding the framework references to the ReferencedAssemblies property in the type provider config.