Fable: Support for implicit yields

Created on 24 Sep 2019  路  8Comments  路  Source: fable-compiler/Fable

The addition of implicit yields sounds really nice for Fable, as sure enough they mentioned it. Is there a thread or issue I can track to see when Fable will support this functionality? Testing it this morning gave me compile errors.

Most helpful comment

2.4.2 works! Love it!

All 8 comments

Looks like the new language features were merged into dotnet/fsharp master yesterday but there are still some build issues. I can rebase to latest from it once it gets to green. It will be a new Fable compiler version, once it's released.

@alfonsogarciacaro fcs-fable is rebased to latest, so we can begin experimenting with the new features, hopefully they don't require (m)any changes in Fable.

Thanks @ncave! I'm getting an error when trying to build latest service_slim fable branch in your fsharp fork. Do you know what it could be?

     1>FSC : warning FS0075: The command-line option '--version' has been deprecated [/Users/alfonsogarciacaronunez/dev/fsharp_fable/fcs/fcs-fable/codegen/codegen.fsproj]
     1>/usr/local/share/dotnet/sdk/3.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(370,5): error MSB4018: The "CreateAppHost" task failed unexpectedly. [/Users/alfonsogarciacaronunez/dev/fsharp_fable/fcs/fcs-fable/codegen/codegen.fsproj]
/usr/local/share/dotnet/sdk/3.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(370,5): error MSB4018: System.IO.IOException: The target file '/Users/alfonsogarciacaronunez/dev/fsharp_fable/artifacts/obj/fcs/netcoreapp3.0/codegen' is a directory, not a file. [/Users/alfonsogarciacaronunez/dev/fsharp_fable/fcs/fcs-fable/codegen/codegen.fsproj]
/usr/local/share/dotnet/sdk/3.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(370,5): error MSB4018:    at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite) [/Users/alfonsogarciacaronunez/dev/fsharp_fable/fcs/fcs-fable/codegen/codegen.fsproj]
/usr/local/share/dotnet/sdk/3.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(370,5): error MSB4018:    at System.IO.File.Copy(String sourceFileName, String destFileName, Boolean overwrite) [/Users/alfonsogarciacaronunez/dev/fsharp_fable/fcs/fcs-fable/codegen/codegen.fsproj]
/usr/local/share/dotnet/sdk/3.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(370,5): error MSB4018:    at Microsoft.NET.HostModel.AppHost.BinaryUtils.CopyFile(String sourcePath, String destinationPath) [/Users/alfonsogarciacaronunez/dev/fsharp_fable/fcs/fcs-fable/codegen/codegen.fsproj]
/usr/local/share/dotnet/sdk/3.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(370,5): error MSB4018:    at Microsoft.NET.HostModel.AppHost.HostWriter.CreateAppHost(String appHostSourceFilePath, String appHostDestinationFilePath, String appBinaryFilePath, Boolean windowsGraphicalUserInterface, String assemblyToCopyResorcesFrom) [/Users/alfonsogarciacaronunez/dev/fsharp_fable/fcs/fcs-fable/codegen/codegen.fsproj]
/usr/local/share/dotnet/sdk/3.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(370,5): error MSB4018:    at Microsoft.NET.Build.Tasks.CreateAppHost.ExecuteCore() [/Users/alfonsogarciacaronunez/dev/fsharp_fable/fcs/fcs-fable/codegen/codegen.fsproj]
/usr/local/share/dotnet/sdk/3.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(370,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/Users/alfonsogarciacaronunez/dev/fsharp_fable/fcs/fcs-fable/codegen/codegen.fsproj]
/usr/local/share/dotnet/sdk/3.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(370,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/Users/alfonsogarciacaronunez/dev/fsharp_fable/fcs/fcs-fable/codegen/codegen.fsproj]
/usr/local/share/dotnet/sdk/3.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(370,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [/Users/alfonsogarciacaronunez/dev/fsharp_fable/fcs/fcs-fable/codegen/codegen.fsproj]

Sorry, actually service_slim did build fine. The error was about the fable branch, I've updated the comment above 鈽濓笍

It works! (unfortunately not in the REPL yet until we fixed the issue with fcs-fable).

I've pushed fable-compiler 2.4.0 with support for implicit yields and other F# 4.7 features, thanks again @ncave!

It seems that fable-compiler 2.4.1 is missing its binfable-cli folder.
fable-compiler 2.4.0 works.

$ webpack
Bundling for development...
fable-compiler 2.4.1
child proccess errored: Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET Core program, but dotnet-C:\Code2019\Src\FCSTools_Solution\XUI\node_modules\fable-compiler\bin\fable-cli\Fable.Cli.dll does not exist.

Yeah, I just realized that 馃槄 Can you please try with 2.4.2?

2.4.2 works! Love it!

Was this page helpful?
0 / 5 - 0 ratings