fsprojects / fsprojects/Paket

Paket restore fails with .netcoreapp3.1 on macOS

Open
#3,773 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs triage
Dominant language
F#
Stars
2.1k
Forks
528
Avg merge
1d 12m
Merged PRs (30d)
54

Description

Description

paket restore and paket update fails with .NET Core 3.1 on macOS. It has previously worked with .NET Core 3.0.

Output from paket restore:

> paket restore
Paket version 5.215.0
Performance:
 - Runtime: 184 milliseconds
Paket failed with
-> Error in paket.dependencies line 4
     Could not parse framework 'netcoreapp3.1'. Try to update or install again or report a paket bug.

Output from paket update:

> paket update
Paket version 5.215.0
Performance:
 - Runtime: 478 milliseconds
Paket failed with
-> Error in paket.dependencies line 3
     Could not parse framework 'netcoreapp3.1'. Try to update or install again or report a paket bug.

Output from paket install -v:

Paket version 5.215.0
found: /Users/Repos/psint-catalog-api/paket.dependencies
Parsing /Users/Repos/psint-catalog-api/paket.dependencies
Performance:
 - Runtime: 444 milliseconds
Paket failed with
-> Error in paket.dependencies line 4
     Could not parse framework 'netcoreapp3.1'. Try to update or install again or report a paket bug.
   StackTrace:
       at Microsoft.FSharp.Core.PrintfModule+PrintFormatToStringThenFail@1645[TResult].Invoke (System.String message) [0x00000] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Paket.DependenciesFileParser.parseLine$cont@493 (System.String fileName, System.Boolean checkDuplicates, Microsoft.FSharp.Collections.FSharpList`1[T] state, System.Int32 lineNo, System.String line, Microsoft.FSharp.Core.Unit unitVar) [0x00102] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Paket.DependenciesFileParser.parseLine (System.String fileName, System.Boolean checkDuplicates, System.Int32 lineNo, Microsoft.FSharp.Collections.FSharpList`1[T] state, System.String line) [0x00021] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Microsoft.FSharp.Collections.ArrayModule.Fold[T,TState] (Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] folder, TState state, T[] array) [0x00023] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Paket.DependenciesFileParser.parseDependenciesFile (System.String fileName, System.Boolean checkDuplicates, System.String[] lines) [0x00023] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Paket.DependenciesFile.ReadFromFile (System.String fileName) [0x0002e] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at <StartupCode$Paket-Core>.$PublicAPI+Install@267.Invoke (Microsoft.FSharp.Core.Unit unitVar0) [0x00001] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Paket.Utils.RunInLockedAccessMode[a] (System.String lockedFolder, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] action) [0x00077] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Paket.Dependencies.Install (Paket.InstallerOptions options) [0x0001d] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Paket.Dependencies.Install (System.Boolean force, System.Boolean withBindingRedirects, System.Boolean cleanBindingRedirects, System.Boolean createNewBindingFiles, System.Boolean onlyReferenced, Paket.SemVerUpdateMode semVerUpdateMode, System.Boolean touchAffectedRefs, System.Boolean generateLoadScripts, Microsoft.FSharp.Collections.FSharpList`1[T] providedFrameworks, Microsoft.FSharp.Collections.FSharpList`1[T] providedScriptTypes, Microsoft.FSharp.Core.FSharpOption`1[T] alternativeProjectRoot) [0x0006e] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Paket.Program.install (Argu.ParseResults`1[Template] results) [0x00a38] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Paket.Program+handleCommand@837-11.Invoke (Argu.ParseResults`1[Template] results) [0x00001] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Paket.Program.processWithValidationEx$cont@42[a] (System.Boolean silent, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] commandF, a result, Microsoft.FSharp.Core.Unit unitVar) [0x00002] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Paket.Program.processWithValidationEx[a] (Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] printUsage, System.Boolean silent, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] validateF, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] commandF, a result) [0x00067] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Paket.Program.processWithValidation[T] (System.Boolean silent, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] validateF, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] commandF, Argu.ParseResults`1[Template] result) [0x00006] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Paket.Program.processCommand[a] (System.Boolean silent, Microsoft.FSharp.Core.FSharpFunc`2[T,TResult] commandF, Argu.ParseResults`1[Template] result) [0x00007] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Paket.Program.handleCommand (System.Boolean silent, Paket.Commands+Command command) [0x001a0] in <34a07b69c40c4371a1c422a46fffa0ff>:0
       at Paket.Program.main () [0x0041e] in <34a07b69c40c4371a1c422a46fffa0ff>:0

paket.dependecies looking like this;

source https://www.myget.org/...
source https://api.nuget.org/v3/index.json

framework: netcoreapp3.1, netstandard2.0
storage: none

nuget Microsoft.ApplicationInsights.AspNetCore
nuget Microsoft.AspNetCore.TestHost
nuget Microsoft.AspNetCore.Cors
nuget Microsoft.AspNetCore.HttpsPolicy
nuget Microsoft.AspNetCore.Server.Kestrel
github battermann/fsharp-hypermedia src/Hypermedia/Hypermedia.fs
nuget Microsoft.Azure.Storage.Blob
nuget xunit
nuget xunit.runner.visualstudio
nuget Giraffe
nuget Microsoft.Extensions.Http
nuget Microsoft.Extensions.Hosting

dotnet --info is looking like this:

.NET Core SDK (reflecting any global.json):
 Version:   3.1.100
 Commit:    cd82f021f4

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.14
 OS Platform: Darwin
 RID:         osx.10.14-x64
 Base Path:   /usr/local/share/dotnet/sdk/3.1.100/

Host (useful for support):
  Version: 3.1.0
  Commit:  65f04fb6db

.NET Core SDKs installed:
  2.2.300 [/usr/local/share/dotnet/sdk]
  2.2.401 [/usr/local/share/dotnet/sdk]
  2.2.402 [/usr/local/share/dotnet/sdk]
  3.0.100 [/usr/local/share/dotnet/sdk]
  3.1.100 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.5 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.6 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.7 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.5 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.6 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.7 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

I tried to install and uninstall the runtime and SDK for version 3.1.0, but with no luck. I get this error on another project with .NET Core 3.1 as well. My colleagues with Windows have successfully updated there. I have not had the opportunity to try this on another Mac.

Repro steps

Get a project with .NET Core App 3.1 with SDK and Runtime 3.1. Get paket and run paket update or paket restore on a Mac.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The failure occurs while parsing paket.dependencies in Paket.DependenciesFileParser.parseLine; start by locating the framework parsing logic and any related tests. Reproduce paket restore or paket update with netcoreapp3.1 on macOS, and consider the issue done when the framework is accepted and the command completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp, macos
Domain
operating-systems, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.