Skip to content

Commit

Permalink
Client 8.0
Browse files Browse the repository at this point in the history
This reverts commit 734a5fe.

add doc for why odd thing was done

replace cli invocation with build script

update fantomas and format files

remove webpack language from build script

binding updates

fix binding versions

fix filters
  • Loading branch information
baronfel committed Jul 10, 2022
1 parent bdd2a38 commit 75e679c
Show file tree
Hide file tree
Showing 33 changed files with 506 additions and 441 deletions.
6 changes: 3 additions & 3 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
]
},
"fable": {
"version": "3.7.8",
"version": "3.7.11",
"commands": [
"fable"
]
},
"fantomas-tool": {
"version": "4.7.0",
"fantomas": {
"version": "5.0.0-alpha-007",
"commands": [
"fantomas"
]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
# need to add linux commands first
os: [windows-latest, macos-latest]
dotnet: [6.0.101]
fail-fast: false # we have timing issues on some OS, so we want them all to run
runs-on: ${{ matrix.os }}

steps:
Expand Down
55 changes: 14 additions & 41 deletions build/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,6 @@ module Fable =
| Watch
| Clean

type Webpack =
| WithoutWebpack
| WithWebpack of args: string option

type Args =
{ Command: Command
Debug: bool
Expand All @@ -76,8 +72,7 @@ module Fable =
OutDir: string option
Defines: string list
SourceMaps: bool
AdditionalFableArgs: string option
Webpack: Webpack }
AdditionalFableArgs: string option }

let DefaultArgs =
{ Command = Build
Expand All @@ -87,8 +82,7 @@ module Fable =
OutDir = Some "./out"
Defines = []
AdditionalFableArgs = None
SourceMaps = true
Webpack = WithoutWebpack }
SourceMaps = true }

let private mkArgs args =
let fableCmd =
Expand Down Expand Up @@ -123,30 +117,11 @@ module Fable =

let fableAdditionalArgs = args.AdditionalFableArgs |> Option.defaultValue ""

let webpackCmd =
match args.Webpack with
| WithoutWebpack -> ""
| WithWebpack webpackArgs ->
sprintf
"--%s webpack %s %s %s"
(match args.Command with
| Watch -> "runWatch"
| _ -> "run")
(if args.Debug then
"--mode=development"
else
"--mode=production")
(if args.Experimental then
"--env.ionideExperimental"
else
"")
(webpackArgs |> Option.defaultValue "")

let sourceMaps = if args.SourceMaps then "-s" else ""

// $"{fableCmd} {fableProjPath} {sourcemaps} {fableOutDir} {fableDebug} {fableExperimental} {fableDefines} {fableAdditionalArgs} {webpackCmd}"
// $"{fableCmd} {fableProjPath} {sourcemaps} {fableOutDir} {fableDebug} {fableExperimental} {fableDefines} {fableAdditionalArgs}"
sprintf
"%s %s %s %s %s %s %s %s %s"
"%s %s %s %s %s %s %s %s"
fableCmd
fableProjPath
sourceMaps
Expand All @@ -155,7 +130,6 @@ module Fable =
fableExperimental
fableDefines
fableAdditionalArgs
webpackCmd

let run args =
let cmd = mkArgs args
Expand Down Expand Up @@ -298,8 +272,7 @@ let initTargets () =
Fable.run
{ Fable.DefaultArgs with
Command = Fable.Watch
Debug = true
Webpack = Fable.WithWebpack None })
Debug = true })

Target.create "InstallVSCE" (fun _ ->
Process.killAllByName "npm"
Expand All @@ -313,15 +286,15 @@ let initTargets () =
Fable.run
{ Fable.DefaultArgs with
Command = Fable.Build
Debug = false
Webpack = Fable.WithWebpack None })
Debug = false })

Target.create "Bundle" (fun _ -> Yarn.exec "run bundle" id)

Target.create "RunDevScript" (fun _ ->
Fable.run
{ Fable.DefaultArgs with
Command = Fable.Build
Debug = true
Webpack = Fable.WithWebpack None })
Debug = true })


Target.create "CopyFSACNetcore" (fun _ ->
Expand Down Expand Up @@ -397,14 +370,14 @@ let initTargets () =
let buildTargetTree () =
let (==>!) x y = x ==> y |> ignore

"YarnInstall" ==>! "RunScript"
"DotNetRestore" ==>! "RunScript"

"Clean" ==> "Format" ==> "RunScript"
==>! "Default"
"YarnInstall" ==>! "Bundle"
"DotNetRestore" ==>! "Bundle"
"RunScript" ==>! "Bundle"
"Clean" ==> "Format" ==> "Bundle" ==>! "Default"

"Clean"
==> "RunScript"
==> "Bundle"
==> "CopyDocs"
==> "CopyFSACNetcore"
==> "CopyGrammar"
Expand Down
11 changes: 11 additions & 0 deletions bundle.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
///esbuild ./out/fsharp.js --bundle --outfile=release/fsharp.js --external:vscode --format=cjs --platform=node --sourcemap
require('esbuild').build({
entryPoints: ['./out/fsharp.js'],
bundle: true,
outfile: 'release/fsharp.js',
external: ['vscode'],
format: 'cjs',
platform: 'node',
sourcemap: true,
logLevel: 'debug'
}).catch((e) => process.exit(1));
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"scripts": {
"gen:semver": "ts2fable node_modules/@types/semver/{classes,functions,internals,ranges}/*.d.ts node_modules/@types/semver/index.d.ts src/Imports/Semver.fs"
"gen:semver": "ts2fable node_modules/@types/semver/{classes,functions,internals,ranges}/*.d.ts node_modules/@types/semver/index.d.ts src/Imports/Semver.fs",
"bundle" : "node bundle.js"
},
"dependencies": {
"htmlparser2": "^4.1.0",
Expand All @@ -16,12 +17,13 @@
"@types/ws": "^7.2.6",
"axios": "^0.20.0",
"babel-loader": "^8.1.0",
"esbuild": "^0.14.39",
"mocha": "^8.1.3",
"showdown": "^1.9.1",
"toml": "^3.0.0",
"ts2fable": "^0.8.0-build.618",
"vscode-debugadapter": "^1.44.0",
"vscode-languageclient": "^7.0.0",
"vscode-languageclient": "^8.0.0",
"webpack": "^4.44.1",
"webpack-cli": "^3.3.12",
"ws": "^7.3.1",
Expand Down
68 changes: 33 additions & 35 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ NUGET
Fable.Browser.Event (>= 1.5)
Fable.Core (>= 3.0)
FSharp.Core (>= 4.7.2)
Fable.Core (3.6.2)
Fable.Core (3.7.1)
Fable.HtmlConverter (2.1)
Fable.Core (>= 3.1.5)
Thoth.Json (>= 4.1)
Expand All @@ -32,19 +32,19 @@ NUGET
Fable.Promise (3.1.3)
Fable.Core (>= 3.1.5)
FSharp.Core (>= 4.7.2)
FSharp.Core (6.0.3)
FSharp.Core (6.0.4)
Thoth.Json (7.0)
Fable.Core (>= 3.1.6)
FSharp.Core (>= 4.7.2)
GIT
remote: https://github.com/ionide/ionide-fsgrammar.git
(8825a76681cdc14801b5d9490372ff67ec6b9711)
(33c42ce4b0960c86837a978fa06c45bc3dec0521)
GITHUB
remote: ionide/ionide-vscode-helpers
src/Fable.Import.Showdown.fs (6ed5341be68452af4f93f7c6e462cdfb58dd0464)
src/Fable.Import.VSCode.fs (6ed5341be68452af4f93f7c6e462cdfb58dd0464)
src/Fable.Import.VSCode.LanguageServer.fs (6ed5341be68452af4f93f7c6e462cdfb58dd0464)
src/Helpers.fs (6ed5341be68452af4f93f7c6e462cdfb58dd0464)
src/Fable.Import.Showdown.fs (8d2fca6c1d49172bdd50b3fcdd6a5d66019dffd0)
src/Fable.Import.VSCode.fs (8d2fca6c1d49172bdd50b3fcdd6a5d66019dffd0)
src/Fable.Import.VSCode.LanguageServer.fs (8d2fca6c1d49172bdd50b3fcdd6a5d66019dffd0)
src/Helpers.fs (8d2fca6c1d49172bdd50b3fcdd6a5d66019dffd0)
GROUP build
STORAGE: NONE
RESTRICTION: == net6.0
Expand Down Expand Up @@ -174,12 +174,12 @@ NUGET
FSharp.Core (>= 6.0)
FParsec (1.1.1)
FSharp.Core (>= 4.3.4)
FSharp.Control.Reactive (5.0.2)
FSharp.Control.Reactive (5.0.5)
FSharp.Core (>= 4.7.2)
System.Reactive (>= 5.0)
FSharp.Core (6.0.3)
Microsoft.Build (17.1)
Microsoft.Build.Framework (>= 17.1)
System.Reactive (>= 5.0 < 6.0)
FSharp.Core (6.0.4)
Microsoft.Build (17.2)
Microsoft.Build.Framework (>= 17.2)
Microsoft.NET.StringTools (>= 1.0)
Microsoft.Win32.Registry (>= 4.3)
System.Collections.Immutable (>= 5.0)
Expand All @@ -189,12 +189,12 @@ NUGET
System.Text.Encoding.CodePages (>= 4.0.1)
System.Text.Json (>= 6.0)
System.Threading.Tasks.Dataflow (>= 6.0)
Microsoft.Build.Framework (17.1)
Microsoft.Build.Framework (17.2)
Microsoft.Win32.Registry (>= 4.3)
System.Security.Permissions (>= 4.7)
Microsoft.Build.Tasks.Core (17.1)
Microsoft.Build.Framework (>= 17.1)
Microsoft.Build.Utilities.Core (>= 17.1)
Microsoft.Build.Tasks.Core (17.2)
Microsoft.Build.Framework (>= 17.2)
Microsoft.Build.Utilities.Core (>= 17.2)
Microsoft.NET.StringTools (>= 1.0)
Microsoft.Win32.Registry (>= 4.3)
System.CodeDom (>= 4.4)
Expand All @@ -205,14 +205,12 @@ NUGET
System.Security.Cryptography.Xml (>= 4.7)
System.Security.Permissions (>= 4.7)
System.Threading.Tasks.Dataflow (>= 6.0)
Microsoft.Build.Utilities.Core (17.1)
Microsoft.Build.Framework (>= 17.1)
Microsoft.Build.Utilities.Core (17.2)
Microsoft.Build.Framework (>= 17.2)
Microsoft.NET.StringTools (>= 1.0)
Microsoft.Win32.Registry (>= 4.3)
System.Collections.Immutable (>= 5.0)
System.Configuration.ConfigurationManager (>= 4.7)
System.Security.Permissions (>= 4.7)
System.Text.Encoding.CodePages (>= 4.0.1)
Microsoft.NET.StringTools (1.0)
System.Memory (>= 4.5.4)
System.Runtime.CompilerServices.Unsafe (>= 5.0)
Expand All @@ -221,27 +219,27 @@ NUGET
System.Security.Principal.Windows (>= 5.0)
Microsoft.Win32.SystemEvents (6.0.1)
Mono.Posix.NETStandard (1.0)
MSBuild.StructuredLogger (2.1.630)
MSBuild.StructuredLogger (2.1.669)
Microsoft.Build (>= 16.10)
Microsoft.Build.Framework (>= 16.10)
Microsoft.Build.Tasks.Core (>= 16.10)
Microsoft.Build.Utilities.Core (>= 16.10)
Newtonsoft.Json (13.0.1)
NuGet.Common (6.1)
NuGet.Frameworks (>= 6.1)
NuGet.Configuration (6.1)
NuGet.Common (>= 6.1)
NuGet.Common (6.2)
NuGet.Frameworks (>= 6.2)
NuGet.Configuration (6.2)
NuGet.Common (>= 6.2)
System.Security.Cryptography.ProtectedData (>= 4.4)
NuGet.Frameworks (6.1)
NuGet.Packaging (6.1)
NuGet.Frameworks (6.2)
NuGet.Packaging (6.2)
Newtonsoft.Json (>= 13.0.1)
NuGet.Configuration (>= 6.1)
NuGet.Versioning (>= 6.1)
NuGet.Configuration (>= 6.2)
NuGet.Versioning (>= 6.2)
System.Security.Cryptography.Cng (>= 5.0)
System.Security.Cryptography.Pkcs (>= 5.0)
NuGet.Protocol (6.1)
NuGet.Packaging (>= 6.1)
NuGet.Versioning (6.1)
NuGet.Protocol (6.2)
NuGet.Packaging (>= 6.2)
NuGet.Versioning (6.2)
Octokit (0.49)
System.CodeDom (6.0)
System.Collections.Immutable (6.0)
Expand All @@ -252,7 +250,7 @@ NUGET
System.Drawing.Common (6.0)
Microsoft.Win32.SystemEvents (>= 6.0)
System.Formats.Asn1 (6.0)
System.Memory (4.5.4)
System.Memory (4.5.5)
System.Reactive (5.0)
System.Reflection.Metadata (6.0.1)
System.Collections.Immutable (>= 6.0)
Expand All @@ -261,7 +259,7 @@ NUGET
System.Security.AccessControl (6.0)
System.Security.Cryptography.Cng (5.0)
System.Formats.Asn1 (>= 5.0)
System.Security.Cryptography.Pkcs (6.0)
System.Security.Cryptography.Pkcs (6.0.1)
System.Formats.Asn1 (>= 6.0)
System.Security.Cryptography.ProtectedData (6.0)
System.Security.Cryptography.Xml (6.0)
Expand All @@ -275,7 +273,7 @@ NUGET
System.Runtime.CompilerServices.Unsafe (>= 6.0)
System.Text.Encodings.Web (6.0)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
System.Text.Json (6.0.3)
System.Text.Json (6.0.4)
System.Runtime.CompilerServices.Unsafe (>= 6.0)
System.Text.Encodings.Web (>= 6.0)
System.Threading.Tasks.Dataflow (6.0)
Expand Down
5 changes: 1 addition & 4 deletions src/Components/CodeLensHelpers.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@ open System
open Fable.Core.JsInterop
open Fable.Import.VSCode
open Fable.Import.VSCode.Vscode
open global.Node

module node = Node.Api

module CodeLensHelpers =

let showReferences (args: string) (args2: obj) (args3: obj []) =
let showReferences (args: string) (args2: obj) (args3: obj[]) =
let uri = vscode.Uri.parse args
let pos = vscode.Position.Create(!!args2?Line, !!args2?Character)

Expand Down
Loading

0 comments on commit 75e679c

Please sign in to comment.