Transitive dependencies from generate-include-scripts fail to load in Fsi
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
In Linux (using Mono 4.6.1.5) the resolution behavior doesn't take into account transitive assemblies of any include script generated by Paket in your main script. Transitive dependencies from I can see are affected by the issue and FSI fails to evaluate/load the transitive assembly.
Repro steps
Please provide the steps required to reproduce the problem
- paket generate-include-scripts to generate the F# scripts.
- Reference the appropriate include script.
- Try using a type from an generated include script that has transitive dependencies on another Nuget package. (e.g a type inported from something like #load "include.main.fsx").
Expected behavior
F# script to just work with the correct dependencies.
Actual behavior
/path/to/current/dir/stdin(0,1): error FS0078: Unable to find the file 'TransitiveDep.dll' in any of
/usr/lib/mono/4.5
Known workarounds
For every assembly load (#r) generated by Paket do it instead via two steps (e.g if assembly is ./paket-files/net46/Newtonsoft.Json.dll):
- Using the #I to register the directory ( #I /paket-files/net46/)
- Loading the #r with or without the directory. (#r Newtonsoft.Json.dll)
If all assembly loads on all generated scripts are done this way it all works as expected.
Believe this is related to: https://github.com/fsharp/fsharp/issues/251.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with paket generate-include-scripts on Linux under Mono 4.6.1.5, then reference a generated include script with a transitive dependency. Compare the generated #r loads with the documented #I workaround; done means Fsi loads the transitive assembly and evaluates the script without FS0078.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100