diff --git a/Fable.REPL.sln b/Fable.REPL.sln
index 4472322a..b25ff409 100644
--- a/Fable.REPL.sln
+++ b/Fable.REPL.sln
@@ -5,6 +5,10 @@ VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "App", "src\App\App.fsproj", "{39F5D300-0762-421C-ACF3-6E4509E44D78}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E3285035-697D-49AA-8A30-95E349A4EBDF}"
+EndProject
+Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "fcs-export", "src\Export\fcs-export.fsproj", "{76A81454-3826-493A-9F19-9D0CE5C6C54E}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -30,5 +34,20 @@ Global
{39F5D300-0762-421C-ACF3-6E4509E44D78}.Release|x64.Build.0 = Release|Any CPU
{39F5D300-0762-421C-ACF3-6E4509E44D78}.Release|x86.ActiveCfg = Release|Any CPU
{39F5D300-0762-421C-ACF3-6E4509E44D78}.Release|x86.Build.0 = Release|Any CPU
+ {76A81454-3826-493A-9F19-9D0CE5C6C54E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {76A81454-3826-493A-9F19-9D0CE5C6C54E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {76A81454-3826-493A-9F19-9D0CE5C6C54E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {76A81454-3826-493A-9F19-9D0CE5C6C54E}.Debug|x64.Build.0 = Debug|Any CPU
+ {76A81454-3826-493A-9F19-9D0CE5C6C54E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {76A81454-3826-493A-9F19-9D0CE5C6C54E}.Debug|x86.Build.0 = Debug|Any CPU
+ {76A81454-3826-493A-9F19-9D0CE5C6C54E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {76A81454-3826-493A-9F19-9D0CE5C6C54E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {76A81454-3826-493A-9F19-9D0CE5C6C54E}.Release|x64.ActiveCfg = Release|Any CPU
+ {76A81454-3826-493A-9F19-9D0CE5C6C54E}.Release|x64.Build.0 = Release|Any CPU
+ {76A81454-3826-493A-9F19-9D0CE5C6C54E}.Release|x86.ActiveCfg = Release|Any CPU
+ {76A81454-3826-493A-9F19-9D0CE5C6C54E}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {76A81454-3826-493A-9F19-9D0CE5C6C54E} = {E3285035-697D-49AA-8A30-95E349A4EBDF}
EndGlobalSection
EndGlobal
diff --git a/global.json b/global.json
index ff4e0c41..aafa131c 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
{
"sdk": {
- "version": "6.0.100",
+ "version": "8.0.100",
"rollForward": "minor"
}
}
diff --git a/paket.dependencies b/paket.dependencies
index 2457303c..0a6cb711 100644
--- a/paket.dependencies
+++ b/paket.dependencies
@@ -3,7 +3,7 @@ storage:none
framework: netstandard2.0
nuget FSharp.Core
-nuget Fable.Core
+nuget Fable.Core 4.3
nuget Fable.Elmish.Browser
nuget Fable.React
nuget Fable.Elmish
@@ -13,14 +13,14 @@ nuget Thoth.Json
nuget Thoth.Elmish.Toast
nuget Fable.Fetch
nuget Fable.FontAwesome.Free
-nuget Feliz prerelease
+nuget Feliz
nuget Feliz.Bulma
nuget Feliz.Bulma.Tooltip
nuget Fable.Browser.Css
-nuget Fable.Browser.Dom == 2.4.4
-nuget Fable.Browser.Event == 1.4.5
+nuget Fable.Browser.Dom
+nuget Fable.Browser.Event
nuget Fable.Browser.MediaQueryList
-nuget Fable.Browser.Navigator == 2.0.0
+nuget Fable.Browser.Navigator
# REPL Lib
diff --git a/paket.lock b/paket.lock
index 416ec720..e0c2f731 100644
--- a/paket.lock
+++ b/paket.lock
@@ -2,68 +2,72 @@ STORAGE: NONE
RESTRICTION: == netstandard2.0
NUGET
remote: https://www.nuget.org/api/v2
- Fable.AST (4.2.1)
- Fable.Browser.Blob (1.3)
- Fable.Core (>= 3.0)
- FSharp.Core (>= 4.7.2)
- Fable.Browser.Css (2.3)
- Fable.Browser.Dom (>= 2.11)
- Fable.Browser.Svg (>= 2.3)
- Fable.Core (>= 3.0)
- FSharp.Core (>= 4.7.2)
- Fable.Browser.Dom (2.4.4)
- Fable.Browser.Blob (>= 1.1.4)
- Fable.Browser.Event (>= 1.4.4)
- Fable.Browser.WebStorage (>= 1.0.4)
- Fable.Core (>= 3.0)
- FSharp.Core (>= 4.7.2)
- Fable.Browser.Event (1.4.5)
- Fable.Browser.Gamepad (>= 1.0.3)
- Fable.Core (>= 3.0)
- FSharp.Core (>= 4.7.2)
- Fable.Browser.Gamepad (1.2)
- Fable.Core (>= 3.0)
- FSharp.Core (>= 4.7.2)
- Fable.Browser.Geolocation (1.2)
- Fable.Core (>= 3.0)
- FSharp.Core (>= 4.7.2)
- Fable.Browser.MediaQueryList (1.4)
- Fable.Browser.Dom (>= 2.11)
- Fable.Browser.Event (>= 1.5)
- Fable.Core (>= 3.0)
- FSharp.Core (>= 4.7.2)
- Fable.Browser.MediaStream (3.3)
- Fable.Browser.Dom (>= 2.11)
- Fable.Browser.Event (>= 1.5)
- Fable.Core (>= 3.0)
- FSharp.Core (>= 4.7.2)
- Fable.Browser.Navigator (2.0)
- Fable.Browser.Gamepad (>= 1.0.3)
- Fable.Browser.Geolocation (>= 1.0.4)
- Fable.Browser.MediaStream (>= 3.0.4)
- Fable.Browser.Worker (>= 1.0.5)
- Fable.Core (>= 3.1.5)
- FSharp.Core (>= 4.7.2)
- Fable.Browser.Svg (2.3)
- Fable.Browser.Dom (>= 2.11)
- Fable.Core (>= 3.0)
- FSharp.Core (>= 4.7.2)
- Fable.Browser.WebStorage (1.2)
- Fable.Browser.Event (>= 1.5)
- Fable.Core (>= 3.0)
- FSharp.Core (>= 4.7.2)
- Fable.Browser.Worker (1.2)
- Fable.Browser.Event (>= 1.5)
- Fable.Core (>= 3.0)
- FSharp.Core (>= 4.7.2)
- Fable.Core (4.0)
- Fable.Elmish (4.0.2)
+ Fable.AST (4.5)
+ Fable.Browser.Blob (1.4)
+ Fable.Core (>= 3.2.8)
+ FSharp.Core (>= 4.7.2)
+ Fable.Browser.Css (2.5)
+ Fable.Browser.Dom (>= 2.16)
+ Fable.Browser.Svg (>= 2.4)
+ Fable.Core (>= 3.2.8)
+ FSharp.Core (>= 4.7.2)
+ Fable.Browser.Dom (2.18)
+ Fable.Browser.Blob (>= 1.4)
+ Fable.Browser.Event (>= 1.7)
+ Fable.Browser.WebStorage (>= 1.3)
+ Fable.Core (>= 3.2.8)
+ FSharp.Core (>= 4.7.2)
+ Fable.Browser.Event (1.7)
+ Fable.Browser.Gamepad (>= 1.3)
+ Fable.Core (>= 3.2.8)
+ FSharp.Core (>= 4.7.2)
+ Fable.Browser.Gamepad (1.3)
+ Fable.Core (>= 3.2.8)
+ FSharp.Core (>= 4.7.2)
+ Fable.Browser.Geolocation (1.3)
+ Fable.Core (>= 3.2.8)
+ FSharp.Core (>= 4.7.2)
+ Fable.Browser.MediaQueryList (1.5)
+ Fable.Browser.Dom (>= 2.16)
+ Fable.Browser.Event (>= 1.6)
+ Fable.Core (>= 3.2.8)
+ FSharp.Core (>= 4.7.2)
+ Fable.Browser.MediaStream (3.4)
+ Fable.Browser.Dom (>= 2.16)
+ Fable.Browser.Event (>= 1.6)
+ Fable.Core (>= 3.2.8)
+ FSharp.Core (>= 4.7.2)
+ Fable.Browser.Navigator (2.5)
+ Fable.Browser.Gamepad (>= 1.3)
+ Fable.Browser.Geolocation (>= 1.3)
+ Fable.Browser.MediaStream (>= 3.3)
+ Fable.Browser.Worker (>= 1.3)
+ Fable.Core (>= 3.2.8)
+ FSharp.Core (>= 4.7.2)
+ Fable.Browser.Svg (2.4)
+ Fable.Browser.Dom (>= 2.16)
+ Fable.Core (>= 3.2.8)
+ FSharp.Core (>= 4.7.2)
+ Fable.Browser.Url (1.4)
+ Fable.Core (>= 3.2.8)
+ FSharp.Core (>= 4.7.2)
+ Fable.Browser.WebStorage (1.3)
+ Fable.Browser.Event (>= 1.6)
+ Fable.Core (>= 3.2.8)
+ FSharp.Core (>= 4.7.2)
+ Fable.Browser.Worker (1.4)
+ Fable.Browser.Event (>= 1.6)
+ Fable.Browser.Url (>= 1.4)
+ Fable.Core (>= 3.2.8)
+ FSharp.Core (>= 4.7.2)
+ Fable.Core (4.3)
+ Fable.Elmish (4.2)
Fable.Core (>= 3.7.1)
FSharp.Core (>= 4.7.2)
- Fable.Elmish.Browser (4.0.1)
- Fable.Browser.Dom (>= 2.10.1)
- Fable.Elmish (>= 4.0)
- Fable.Elmish.UrlParser (>= 1.0.1)
+ Fable.Elmish.Browser (4.0.3)
+ Fable.Browser.Dom (>= 2.14)
+ Fable.Elmish (>= 4.1)
+ Fable.Elmish.UrlParser (>= 1.0.2)
FSharp.Core (>= 4.7.2)
Fable.Elmish.HMR (7.0)
Fable.Core (>= 3.7.1)
@@ -73,9 +77,9 @@ NUGET
Fable.Elmish (>= 4.0)
Fable.ReactDom.Types (>= 18.0)
FSharp.Core (>= 4.7.2)
- Fable.Elmish.UrlParser (1.0.1)
+ Fable.Elmish.UrlParser (1.0.2)
FSharp.Core (>= 4.7.2)
- Fable.Fetch (2.6)
+ Fable.Fetch (2.7)
Fable.Browser.Blob (>= 1.2)
Fable.Browser.Event (>= 1.5)
Fable.Core (>= 3.7.1)
@@ -91,7 +95,7 @@ NUGET
Fable.Promise (3.2)
Fable.Core (>= 3.7.1)
FSharp.Core (>= 4.7.2)
- Fable.React (9.3)
+ Fable.React (9.4)
Fable.React.Types (>= 18.3)
Fable.ReactDom.Types (>= 18.2)
FSharp.Core (>= 4.7.2)
@@ -102,7 +106,7 @@ NUGET
Fable.ReactDom.Types (18.2)
Fable.React.Types (>= 18.3)
FSharp.Core (>= 4.7.2)
- Feliz (2.6)
+ Feliz (2.8)
Fable.ReactDom.Types (>= 18.2)
Feliz.CompilerPlugins (>= 2.2)
FSharp.Core (>= 4.7.2)
@@ -121,14 +125,14 @@ NUGET
FsCheck.NUnit (2.16.6)
FsCheck (2.16.6)
NUnit (>= 3.13.1 < 4.0)
- FSharp.Core (7.0.300)
- Microsoft.NET.Test.Sdk (17.7)
+ FSharp.Core (8.0.401)
+ Microsoft.NET.Test.Sdk (17.11.1)
Microsoft.NETCore.Platforms (7.0.4)
NETStandard.Library (2.0.3)
Microsoft.NETCore.Platforms (>= 1.1)
- NUnit (3.13.3)
+ NUnit (3.14)
NETStandard.Library (>= 2.0)
- NUnit3TestAdapter (4.5)
+ NUnit3TestAdapter (4.6)
SourceLink.Create.CommandLine (2.8.3)
Thoth.Elmish.Toast (4.0)
Fable.Core (>= 3.7.1)
@@ -139,8 +143,8 @@ NUGET
Thoth.Json (10.2)
Fable.Core (>= 3.6.2)
FSharp.Core (>= 4.7.2)
- Unquote (6.1)
- FSharp.Core (>= 4.7.2)
+ Unquote (7.0)
+ FSharp.Core (>= 8.0.100)
GITHUB
remote: elmish/elmish
FULLPROJECT (8354fe939afe8a5de633586915c7da31b29e162a)
diff --git a/src/Export/Program.fs b/src/Export/Program.fs
index 99cce166..e80887bc 100644
--- a/src/Export/Program.fs
+++ b/src/Export/Program.fs
@@ -1,35 +1,42 @@
open System.IO
open System.Collections.Generic
open FSharp.Compiler.CodeAnalysis
+open Ionide.ProjInfo
let readRefs (folder : string) (projectFile: string) =
- let runProcess (workingDir: string) (exePath: string) (args: string) =
- let psi = System.Diagnostics.ProcessStartInfo()
- psi.FileName <- exePath
- psi.WorkingDirectory <- workingDir
- psi.RedirectStandardOutput <- false
- psi.RedirectStandardError <- false
- psi.Arguments <- args
- psi.CreateNoWindow <- true
- psi.UseShellExecute <- false
+ let projectDirectory: DirectoryInfo = DirectoryInfo folder
+ let fsProjPath = __SOURCE_DIRECTORY__ + "/" + projectFile
+ let toolsPath = Init.init projectDirectory None
+ let defaultLoader: IWorkspaceLoader = WorkspaceLoader.Create(toolsPath, [])
- use p = new System.Diagnostics.Process()
- p.StartInfo <- psi
- p.Start() |> ignore
- p.WaitForExit()
+ let mutable isReady = false
+ let mutable refs = []
- let exitCode = p.ExitCode
- exitCode, ()
+ let subscription: System.IDisposable = defaultLoader.Notifications.Subscribe(fun msg ->
+ match msg with
+ | Types.WorkspaceProjectState.Loaded (proj, _, _) ->
+ printfn "Project loaded"
- let runCmd exePath args = runProcess folder exePath (args |> String.concat " ")
- let msbuildExec = Dotnet.ProjInfo.Inspect.dotnetMsbuild runCmd
- let result = Dotnet.ProjInfo.Inspect.getProjectInfo ignore msbuildExec Dotnet.ProjInfo.Inspect.getFscArgs projectFile
- match result with
- | Ok(Dotnet.ProjInfo.Inspect.GetResult.FscArgs x) ->
- x
- |> List.filter (fun s -> s.StartsWith("-r:"))
- |> List.map (fun s -> s.Replace("-r:", ""))
- | _ -> []
+ refs <-
+ proj.OtherOptions
+ |> List.filter (fun s -> s.StartsWith("-r:"))
+ |> List.map (fun s -> s.Replace("-r:", ""))
+ isReady <- true
+
+ | Types.WorkspaceProjectState.Failed (projectFilePath, errors) ->
+ printfn "Errors: %A" errors
+ failwithf "Failed to load project: %s" projectFilePath
+ | Types.WorkspaceProjectState.Loading (projectFilePath) ->
+ printfn "Loading project: %s" projectFilePath
+ )
+
+ let projectOptions = defaultLoader.LoadProjects([ fsProjPath ]) |> Seq.toArray
+
+ // This is ugly, but I don't know how to transform an Observable to Async or Syncronous operation
+ while not isReady do
+ System.Threading.Thread.Sleep(100)
+
+ refs
let mkStandardProjectReferences () =
let file = "fcs-export.fsproj"
diff --git a/src/Export/build.sh b/src/Export/build.sh
old mode 100644
new mode 100755
index aab012ea..699547ca
--- a/src/Export/build.sh
+++ b/src/Export/build.sh
@@ -1,3 +1,5 @@
+#!/bin/bash
+
# This expects to be run from repo root dir and have ncave's F# compiler fork
# and Fable repos in sibling folders
@@ -5,13 +7,15 @@ NCAVE_FSHARP_REPO=fsharp_fable
REPL_REPO=repl
set -x # Output commands as they're executed
+set -e # Stop on first error
+set -o noglob # Disable globbing
dotnet build src/Fable.Repl.Lib
cd ../$NCAVE_FSHARP_REPO
git checkout export
-dotnet build -c Release src/buildtools/buildtools.proj
-dotnet build -c Release src/fsharp/FSharp.Compiler.Service
+dotnet build -c Release buildtools/buildtools.proj
+dotnet build -c Release src/Compiler/FSharp.Compiler.Service.fsproj
cd ../$REPL_REPO
dotnet run -c Release -p src/Export
diff --git a/src/Export/fcs-export.fsproj b/src/Export/fcs-export.fsproj
index b98cef71..73edcc07 100644
--- a/src/Export/fcs-export.fsproj
+++ b/src/Export/fcs-export.fsproj
@@ -2,7 +2,7 @@
Exe
- net5.0
+ net8.0
true
@@ -18,8 +18,8 @@
-
-
+
+
diff --git a/src/Fable.Repl.Lib/Sutil/Sutil.fsproj b/src/Fable.Repl.Lib/Sutil/Sutil.fsproj
index 65a09a33..66456cf5 100644
--- a/src/Fable.Repl.Lib/Sutil/Sutil.fsproj
+++ b/src/Fable.Repl.Lib/Sutil/Sutil.fsproj
@@ -40,8 +40,8 @@
-
-
+