fable-compiler / repl

Fable online REPL
http://fable.io/repl
MIT License
61 stars 34 forks source link

Error while running `./fake.sh build -t WatchApp` on Mac #181

Closed naclu02 closed 8 months ago

naclu02 commented 1 year ago

I get an error while running the ./fake.sh build -t WatchApp command on Mac

Status:       Failure
---------------------------------------------------------------------
Script reported an error:
-> BuildFailedException: Target 'Restore' failed.
-> One or more errors occurred. (Unsupported log file format. Latest supported version is 14, the log file has version 15.)
-> NotSupportedException: Unsupported log file format. Latest supported version is 14, the log file has version 15.

Verbose details:

Script reported an error:
-> BuildFailedException: Target 'Restore' failed.
   StackTrace:
        at Fake.Core.TargetModule.raiseIfError(OptionalTargetContext context) in D:\a\1\s\src\app\Fake.Core.Target\Target.fs:line 991
        at Fake.Core.TargetModule.runOrList() in D:\a\1\s\src\app\Fake.Core.Target\Target.fs:line 1181
        at <StartupCode$build_7136313D628FCB1ADAD29CDB6AB15DE95BBDAC5DC94A74E833EA79BBA0D0D5F0>.$Build$fsx.main@() in /Users/lucasnaceri/repl/build.fsx:line 229
        at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
-> One or more errors occurred. (Unsupported log file format. Latest supported version is 14, the log file has version 15.)
-> NotSupportedException: Unsupported log file format. Latest supported version is 14, the log file has version 15.
   StackTrace:
        at Microsoft.Build.Logging.StructuredLogger.BinLogReader.ReadRecordsFromDecompressedStream(Stream decompressedStream)+MoveNext() in C:\MSBuildStructuredLog\src\StructuredLogger\BinaryLogger\BinLogReader.cs:line 218
        at Microsoft.FSharp.Collections.Internal.IEnumerator.choose@171.System.Collections.IEnumerator.MoveNext() in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 178
        at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable`1 source)
        at Fake.DotNet.MSBuildBinLog.getErrorsAndWarnings(String binLogFilePath) in D:\a\1\s\src\app\Fake.DotNet.MSBuild\BinLog.fs:line 32
        at Fake.DotNet.MSBuild.handleAfterRun(String command, FSharpOption`1 binLogPath, Int32 exitCode, String project) in D:\a\1\s\src\app\Fake.DotNet.MSBuild\MSBuild.fs:line 738
        at Fake.DotNet.DotNet.restore(FSharpFunc`2 setParams, String project) in D:\a\1\s\src\app\Fake.DotNet.Cli\DotNet.fs:line 1208
        at Build.restore@106.Invoke(TargetParameter unitVar) in /Users/lucasnaceri/repl/build.fsx:line 106
        at Fake.Core.TargetModule.runSimpleInternal(TargetContext context, Target target) in D:\a\1\s\src\app\Fake.Core.Target\Target.fs:line 299
MangelMaxime commented 1 year ago

Hello,

The problem is not related to Mac but because you are using a newer version of .NET than the one used at the time to setup the build system.

Each time .NET has a new release, FAKE/Dotnet build system seems to break because of the log file format...

My solution to fix this problem, is in general to update the dependencies group of netcorebuild. dotnet paket update netcorebuild and hope that not too many stuff breaks...

My long term solution is to remove FAKE and replace it with Fun.Build which seems more robust at least up to now, I never had a problem like that with it.

naclu02 commented 1 year ago

I get an error while running ./fake.sh build -t WatchApp command after running the dotnet paket update netcorebuild command on Mac.

There was a problem while setting up the environment:
-> Error during parsing of '/Users/lulu/Downloads/repl-4.1.3/paket.lock'.
-> invalid parameter 'net6.0' after >= or < in '>= net6.0'
Hint: If you just upgraded the fake-runner you can try to remove the .fake directory and try again.
MangelMaxime commented 1 year ago

You probably need to update paket too: dotnet tool update paket

I am short on time during the coming days, but I will make a note to myself to try looking at this issue in a fews days or week.

naclu02 commented 1 year ago

I still got an error after running ./fake.sh build -t WatchApp command after running the dotnet tool update paket command. After running the dotnet paket update netcorebuild command:

Paket failed with
-> Package netcorebuild was not found in paket.dependencies in group Main.
MangelMaxime commented 1 year ago

Sorry the command is dotnet paket update --group netcorebuild

naclu02 commented 1 year ago

I still got an error while running the ./fake.sh build -t WatchApp after running the dotnet paket update --group netcorebuild command.

There was a problem while setting up the environment:
-> Error during parsing of '/Users/lulu/Downloads/repl-4.1.3/paket.lock'.
-> failed to parse line '      Microsoft.Win32.Registry (>= 5.0) - restriction: && (< net472) (< net7.0) (>= netstandard2.0)' (invalid parameter 'net7.0' after >= or < in '< net7.0) (>= netstandard2.0)') (Could not parse 'framework: restriction: && (< net472) (< net7.0) (>= netstandard2.0)' as key/value pairs.)
    -  invalid parameter 'net7.0' after >= or < in '< net7.0) (>= netstandard2.0)'
    -  Could not parse 'framework: restriction: && (< net472) (< net7.0) (>= netstandard2.0)' as key/value pairs.
    -> invalid delimiter at position 22
naclu02 commented 1 year ago

I'm waiting for these errors to be resolved

naclu02 commented 11 months ago

Still not working

MangelMaxime commented 11 months ago

Hello @Lucas-nac27,

No need to spam this issue. I have it tracked and could not work on it because I was on vacation.

MangelMaxime commented 11 months ago

I reworked the build system but I am stuck waiting for a fix upstream. More info the PR and linked issue.