Skip to content

Commit

Permalink
Update fantomas to v4.4.0-alpha-008
Browse files Browse the repository at this point in the history
Things I don't like:
1) are we sure it cannot be in a single line?:
         member __.GetLastCachedData (): CachedNetworkData =
             lock
                 cacheFiles.CachedNetworkData
-                (fun _ -> sessionCachedNetworkData)
+                (fun _ -> sessionCachedNetworkData
+                )

2) are we sure it cannot be in a single line?:
            raise
                (TlsNotSupportedYetInGWalletException ("TLS not yet supported"))
            raise (
                TlsNotSupportedYetInGWalletException ("TLS not yet supported")
            )

Things I should report (if not reported yet):
1)
Processing src/GWallet.Backend/Ether/EtherServer.fs
The following exception occurs while formatting stdin: Fantomas.FormatConfig+FormatException: Formatted content is not valid F# code
   at Fantomas.Extras.FakeHelpers.formatContentInternalAsync@95-5.Invoke(Boolean _arg2) in C:\Users\nojaf\Projects\fantomas\src\Fantomas.Extras\FakeHelpers.fs:line 96
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation`1 ctxt, FSharpFunc`2 userCode, b result1) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 404
   at [email protected](AsyncActivation`1 ctxt) in C:\Users\nojaf\Projects\fantomas\src\Fantomas\CodeFormatterImpl.fs:line 378
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 104
--- End of stack trace from previous location ---
   at Microsoft.FSharp.Control.AsyncResult`1.Commit() in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 337
   at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronouslyInCurrentThread[a](CancellationToken cancellationToken, FSharpAsync`1 computation) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 870
   at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronously[T](CancellationToken cancellationToken, FSharpAsync`1 computation, FSharpOption`1 timeout) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 878
   at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 1142
   at Program.processSourceString(Boolean isFsiFile, String s, FSharpChoice`2 tw, FormatConfig config) in C:\Users\nojaf\Projects\fantomas\src\Fantomas.CoreGlobalTool\Program.fs:line 113
   at Program.stringToFile@310(Boolean force, Boolean profile, String s, String outFile, FormatConfig config) in C:\Users\nojaf\Projects\fantomas\src\Fantomas.CoreGlobalTool\Program.fs:line 322

2)
Processing src/GWallet.Backend/FaultTolerantParallelClient.fs
The following exception occurs while formatting stdin: Fantomas.FormatConfig+FormatException: Formatted content is not valid F# code
   at Fantomas.Extras.FakeHelpers.formatContentInternalAsync@95-5.Invoke(Boolean _arg2) in C:\Users\nojaf\Projects\fantomas\src\Fantomas.Extras\FakeHelpers.fs:line 96
   at Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvokeNoHijackCheck[a,b](AsyncActivation`1 ctxt, FSharpFunc`2 userCode, b result1) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 404
   at [email protected](AsyncActivation`1 ctxt) in C:\Users\nojaf\Projects\fantomas\src\Fantomas\CodeFormatterImpl.fs:line 378
   at Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 104
--- End of stack trace from previous location ---
   at Microsoft.FSharp.Control.AsyncResult`1.Commit() in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 337
   at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronouslyInCurrentThread[a](CancellationToken cancellationToken, FSharpAsync`1 computation) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 870
   at Microsoft.FSharp.Control.AsyncPrimitives.RunSynchronously[T](CancellationToken cancellationToken, FSharpAsync`1 computation, FSharpOption`1 timeout) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 878
   at Microsoft.FSharp.Control.FSharpAsync.RunSynchronously[T](FSharpAsync`1 computation, FSharpOption`1 timeout, FSharpOption`1 cancellationToken) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\async.fs:line 1142
   at Program.processSourceString(Boolean isFsiFile, String s, FSharpChoice`2 tw, FormatConfig config) in C:\Users\nojaf\Projects\fantomas\src\Fantomas.CoreGlobalTool\Program.fs:line 113
   at Program.stringToFile@310(Boolean force, Boolean profile, String s, String outFile, FormatConfig config) in C:\Users\nojaf\Projects\fantomas\src\Fantomas.CoreGlobalTool\Program.fs:line 322

NOTE: one of these two above may be fsprojects/fantomas#1241

3)
D:\a\geewallet\geewallet\src\GWallet.Backend\UtxoCoin\UtxoCoinAccount.fs(639,13): error FS0058: Possible incorrect indentation: this token is offside of context started at position (638:13). Try indenting this token further or using standard formatting conventions. [D:\a\geewallet\geewallet\src\GWallet.Backend\GWallet.Backend.fsproj]
  D:\a\geewallet\geewallet\src\GWallet.Backend\UtxoCoin\UtxoCoinAccount.fs(639,13): error FS0058: Possible incorrect indentation: this token is offside of context started at position (638:13). Try indenting this token further or using standard formatting conventions. [D:\a\geewallet\geewallet\src\GWallet.Backend\GWallet.Backend.fsproj]
  D:\a\geewallet\geewallet\src\GWallet.Backend\UtxoCoin\UtxoCoinAccount.fs(640,13): error FS0058: Possible incorrect indentation: this token is offside of context started at position (638:13). Try indenting this token further or using standard formatting conventions. [D:\a\geewallet\geewallet\src\GWallet.Backend\GWallet.Backend.fsproj]
  D:\a\geewallet\geewallet\src\GWallet.Backend\UtxoCoin\UtxoCoinAccount.fs(640,13): error FS0058: Possible incorrect indentation: this token is offside of context started at position (638:13). Try indenting this token further or using standard formatting conventions. [D:\a\geewallet\geewallet\src\GWallet.Backend\GWallet.Backend.fsproj]
  D:\a\geewallet\geewallet\src\GWallet.Backend\Ether\EtherAccount.fs(582,13): error FS0058: Possible incorrect indentation: this token is offside of context started at position (581:13). Try indenting this token further or using standard formatting conventions. [D:\a\geewallet\geewallet\src\GWallet.Backend\GWallet.Backend.fsproj]
  D:\a\geewallet\geewallet\src\GWallet.Backend\Ether\EtherAccount.fs(582,13): error FS0058: Possible incorrect indentation: this token is offside of context started at position (581:13). Try indenting this token further or using standard formatting conventions. [D:\a\geewallet\geewallet\src\GWallet.Backend\GWallet.Backend.fsproj]
  D:\a\geewallet\geewallet\src\GWallet.Backend\Ether\EtherAccount.fs(583,13): error FS0058: Possible incorrect indentation: this token is offside of context started at position (581:13). Try indenting this token further or using standard formatting conventions. [D:\a\geewallet\geewallet\src\GWallet.Backend\GWallet.Backend.fsproj]
  D:\a\geewallet\geewallet\src\GWallet.Backend\Ether\EtherAccount.fs(583,13): error FS0058: Possible incorrect indentation: this token is offside of context started at position (581:13). Try indenting this token further or using standard formatting conventions. [D:\a\geewallet\geewallet\src\GWallet.Backend\GWallet.Backend.fsproj]
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\MSBuild.exe build failed
  D:\a\geewallet\geewallet\src\GWallet.Backend\Account.fs(489,13): error FS0058: Possible incorrect indentation: this token is offside of context started at position (488:13). Try indenting this token further or using standard formatting conventions. [D:\a\geewallet\geewallet\src\GWallet.Backend\GWallet.Backend.fsproj]
  D:\a\geewallet\geewallet\src\GWallet.Backend\Account.fs(489,13): error FS0058: Possible incorrect indentation: this token is offside of context started at position (488:13). Try indenting this token further or using standard formatting conventions. [D:\a\geewallet\geewallet\src\GWallet.Backend\GWallet.Backend.fsproj]
  D:\a\geewallet\geewallet\src\GWallet.Backend\Account.fs(490,13): error FS0058: Possible incorrect indentation: this token is offside of context started at position (488:13). Try indenting this token further or using standard formatting conventions. [D:\a\geewallet\geewallet\src\GWallet.Backend\GWallet.Backend.fsproj]
  D:\a\geewallet\geewallet\src\GWallet.Backend\Account.fs(490,13): error FS0058: Possible incorrect indentation: this token is offside of context started at position (488:13). Try indenting this token further or using standard formatting conventions. [D:\a\geewallet\geewallet\src\GWallet.Backend\GWallet.Backend.fsproj]
  • Loading branch information
knocte committed Jan 17, 2021
1 parent 8c1a8ea commit 739e364
Show file tree
Hide file tree
Showing 27 changed files with 1,450 additions and 1,065 deletions.
326 changes: 185 additions & 141 deletions src/GWallet.Backend/Account.fs

Large diffs are not rendered by default.

42 changes: 27 additions & 15 deletions src/GWallet.Backend/AccountTypes.fs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,12 @@ type IAccount =
abstract PublicAddress: string

[<AbstractClass>]
type BaseAccount (currency: Currency,
accountFile: FileRepresentation,
fromAccountFileToPublicAddress: FileRepresentation -> string) =
type BaseAccount
(
currency: Currency,
accountFile: FileRepresentation,
fromAccountFileToPublicAddress: FileRepresentation -> string
) =
member val AccountFile = accountFile

abstract Kind: AccountKind
Expand All @@ -56,27 +59,36 @@ type BaseAccount (currency: Currency,
member val PublicAddress = fromAccountFileToPublicAddress accountFile


type NormalAccount (currency: Currency,
accountFile: FileRepresentation,
fromAccountFileToPublicAddress: FileRepresentation -> string) =
inherit BaseAccount(currency, accountFile, fromAccountFileToPublicAddress)
type NormalAccount
(
currency: Currency,
accountFile: FileRepresentation,
fromAccountFileToPublicAddress: FileRepresentation -> string
) =
inherit BaseAccount (currency, accountFile, fromAccountFileToPublicAddress)

member internal __.GetEncryptedPrivateKey () =
accountFile.Content ()

override __.Kind = AccountKind.Normal

type ReadOnlyAccount (currency: Currency,
accountFile: FileRepresentation,
fromAccountFileToPublicAddress: FileRepresentation -> string) =
inherit BaseAccount(currency, accountFile, fromAccountFileToPublicAddress)
type ReadOnlyAccount
(
currency: Currency,
accountFile: FileRepresentation,
fromAccountFileToPublicAddress: FileRepresentation -> string
) =
inherit BaseAccount (currency, accountFile, fromAccountFileToPublicAddress)

override __.Kind = AccountKind.ReadOnly

type ArchivedAccount (currency: Currency,
accountFile: FileRepresentation,
fromAccountFileToPublicAddress: FileRepresentation -> string) =
inherit BaseAccount(currency, accountFile, fromAccountFileToPublicAddress)
type ArchivedAccount
(
currency: Currency,
accountFile: FileRepresentation,
fromAccountFileToPublicAddress: FileRepresentation -> string
) =
inherit BaseAccount (currency, accountFile, fromAccountFileToPublicAddress)

member internal __.GetUnencryptedPrivateKey () =
accountFile.Content ()
Expand Down
Loading

0 comments on commit 739e364

Please sign in to comment.