-
Notifications
You must be signed in to change notification settings - Fork 847
Description
@smoothdeveloper The spec for dependency manager resolution seems not to be implemented - it references things like "fsx-extensions" but that string doesn't occur anywhere in the F# codebase.
So it's kind of hard to discern how things are intended to work, or how things are actually resolved today, or how things could be adjusted.
I'd say the first thing is to update the spec to clarify what is there today. I'll adjust this issue to track that, also close #12895 as a duplicate since everything else depends on that.
Problem
The dependency provider feature has extensibility points to allow third party providers to hook into the resolution.
The current search paths are tooling dependent (VS has its own, Ionide its own, Rider its own, dotnet fsi its own, etc.) as they are based on location of compiler assemblies used by the tooling.
This makes impossible a one step system wide or user account wide installation, working across all the toolchains. It will hurt adoption of third party providers and yield fair amount of support requests.
Location of the search paths AFAIK:
fsharp/src/fsharp/Interactive.DependencyManager/DependencyProvider.fs
Lines 246 to 251 in b10400b
| let assemblySearchPaths = lazy ( | |
| [ | |
| let assemblyLocation = typeof<IDependencyManagerProvider>.GetTypeInfo().Assembly.Location | |
| yield Path.GetDirectoryName assemblyLocation | |
| yield AppDomain.CurrentDomain.BaseDirectory | |
| ]) |
Describe the solution you'd like
A stable search path under user account may be added to the list. Maybe a system wide can be added as well.
Another aproach would be for referenced assemblies to be probed as well, it would enable using existing #r syntax to load the extension from a known path or an already installed handler. Albeit this has an extra runtime cost, maybe a baked-in extension should have this role:
#r @"load-extension: path/to/extension.dll"
Although those incur extra code in the scripts.
Describe alternatives you've considered
Looking for some, please share your insight, provide feedback on this feature request.
Additional context
The RFC had hints on such location: https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1027-fsi-references.md#handler-resolution
Metadata
Metadata
Assignees
Labels
Type
Projects
Status