Dependency manager looks up older tool version of paket
Nobody has claimed this yet.
- Dominant language
- F#
- Stars
- 2.1k
- Forks
- 528
- Avg merge
- 1d 12m
- Merged PRs (30d)
- 54
Description
Description
When I run FSI using the Dependency Manager extension for paket, it resolves a path to paket.exe through an older version of a dotnet CLI tool package.
Repro steps
Please provide the steps required to reproduce the problem
-
Launch FSI with
dotnet fsi --compilertool:"D:\Users\ben\proj\mbrace\MBrace.Core\packages\fsi\FSharp.DependencyManager.Paket\lib\netstandard2.0\" -
Evaluate this:
#r "packet: nuget FSharp.Data" // or any package name, this is just the one I used.
Expected behavior
The dependency manager resolves to latest available version of the paket cli tool and successfully resolves requested package.
Actual behavior
λ dotnet fsi --compilertool:"D:\Users\ben\proj\mbrace\MBrace.Core\packages\fsi\FSharp.DependencyManager.Paket\lib\netstandard2.0\"
Microsoft (R) F# Interactive version 12.0.4.0 for F# 6.0
Copyright (c) Microsoft Corporation. All Rights Reserved.
For help type #help;;
> #r "paket: nuget FSharp.Data";;
:paket> using C:\Users\Ben\.nuget\packages\paket\6.0.0-beta2\tools\paket.exe
:paket> Paket version 6.0.0-beta2
:paket> Total time taken: 0 milliseconds
exception while resolving dependencies: System.Exception: Package resolution using 'C:\Users\Ben\.nuget\packages\paket\6.0.0-beta2\tools\paket.exe' failed, see directory 'C:\Users\Ben\AppData\Local\Temp\script-packages\1601146677'.
Paket failed with
-> Error in paket.dependencies line 1
Could not parse framework 'net6.0'. Try to update or install again or report a paket bug.
at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1448.Invoke(String message)
at ReferenceLoading.PaketHandler.ResolveDependenciesForLanguage$cont@168(String targetFramework, String scriptDir, IEnumerable`1 prioritizedSearchPaths, String fileType, String workingDir, FileInfo workingDirSpecFile, String rootDir, FSharpList`1 packageManagerTextLines, String loadScript, Unit unitVar) in D:\code\Paket\src\FSharp.DependencyManager.Paket\ReferenceLoading.PaketHandler.fs:line 253
at ReferenceLoading.PaketHandler.ResolveDependenciesForLanguage(String fileType, String targetFramework, IEnumerable`1 prioritizedSearchPaths, String scriptDir, String scriptName, IEnumerable`1 packageManagerTextLinesFromScript) in D:\code\Paket\src\FSharp.DependencyManager.Paket\ReferenceLoading.PaketHandler.fs:line 168
at ReferenceLoading.PaketHandler.ResolveDependencies(String targetFramework, String scriptDir, String scriptName, IEnumerable`1 packageManagerTextLinesFromScript) in D:\code\Paket\src\FSharp.DependencyManager.Paket\ReferenceLoading.PaketHandler.fs:line 272
at Microsoft.FSharp.DependencyManager.Paket.PaketDependencyManagerProvider.ResolveDependencies(String scriptDir, String mainScriptName, String scriptName, IEnumerable`1 packageManagerTextLines, String targetFramework) in D:\code\Paket\src\FSharp.DependencyManager.Paket\PaketDependencyManager.fs:line 44
>
I have the following installed versions of the paket CLI tool:
λ ls ~/.nuget/packages/paket
Directory: C:\Users\Ben\.nuget\packages\paket
Mode LastWriteTime FileSize Name
---- ------------- -------- ----
d---- 6/18/2020 8:34 PM 5.241.5
d---- 5/9/2020 1:05 PM 5.242.2
d---- 4/30/2020 4:04 PM 5.244.1
d---- 6/17/2020 3:11 PM 5.247.2
d---- 6/9/2022 6:20 PM 6.0.0-alpha042
d---- 8/15/2021 7:06 PM 6.0.0-beta2
d---- 8/15/2021 6:59 PM 6.0.4
d---- 6/10/2022 10:25 AM 7.1.5
~
λ
Known workarounds
Please provide a description of any known workarounds.
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
Reproduce the failure with the listed dotnet fsi command and the Paket reference, then inspect FSharp.DependencyManager.Paket/ReferenceLoading.PaketHandler.fs around ResolveDependenciesForLanguage and PaketDependencyManager.fs. Trace how the paket CLI path and version are selected. Done means the latest available installed Paket tool is selected and the FSharp.Data reference resolves successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fsharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100