Skip to content

Utility: use Fsdk - #55

Open
webwarrior-ws wants to merge 4 commits into
nblockchain:masterfrom
webwarrior-ws:fsharputil-retry
Open

Utility: use Fsdk#55
webwarrior-ws wants to merge 4 commits into
nblockchain:masterfrom
webwarrior-ws:fsharputil-retry

Conversation

@webwarrior-ws

@webwarrior-ws webwarrior-ws commented Jan 9, 2023

Copy link
Copy Markdown

Added fsdk package. Reuse functions from Fsdk.

Renamed FSharpUtil module to AsyncUtil.

Changed Retry function to take 1 type parameter instead of 2 as handling 2 types of exceptions is not needed anymore because SocketException is wrapped in NOnionException.

@aarani

aarani commented Jan 9, 2023

Copy link
Copy Markdown
Collaborator

LGTM

Comment thread NOnion/Utility/FSharpUtil.fs Outdated
@knocte

knocte commented Jan 9, 2023

Copy link
Copy Markdown
Member

@webwarrior-ws can you also fix the conventions job with a similar commit to this please: 37e374a7b03cb55b4718c46e65911f09c21f876b (and move it to be the first commit).

@webwarrior-ws
webwarrior-ws force-pushed the fsharputil-retry branch 2 times, most recently from 05bd5a1 to c99a359 Compare January 9, 2023 13:34
@webwarrior-ws

Copy link
Copy Markdown
Author

Should be good now

@knocte

knocte commented Jan 9, 2023

Copy link
Copy Markdown
Member

LGTM

Please approve via GitHub PR approval process.

@knocte

knocte commented Jan 11, 2023

Copy link
Copy Markdown
Member

Please approve via GitHub PR approval process.

@aarani ^ otherwise I get "Merging is blocked" in the GitHub UI.

@webwarrior-ws

Copy link
Copy Markdown
Author

Can't use Fsdk because it requires FSharp.Core 6.0, but NOnion uses 4.7.2 (in CI at least).

@knocte

knocte commented Jan 16, 2023

Copy link
Copy Markdown
Member

Upgrade FSharp.Core then?

@webwarrior-ws
webwarrior-ws force-pushed the fsharputil-retry branch 3 times, most recently from f9d5866 to 35d2ec5 Compare January 16, 2023 13:27
Comment thread NOnion/Utility/FSharpUtil.fs
@knocte

knocte commented Jan 18, 2023

Copy link
Copy Markdown
Member

Thinking about it more, please revert your last commit that removes NOnion.Utility.FSharpUtil.WithTimeout, but I want FSharpUtil module be gone from NOnion to prevent naming clash with Fsdk, so let's rename it to NetworkUtils.fs? (To be consistent with other files in that folder.) BTW I had a look at other files in that folder and I think ResultUtils.fs's OperationResult overlaps with FSharpUtil's Either, let's remove it and use Either. And same thing for the Unwrap function, I think FSharpUtil has Unwrap func? If not, let's move it to Fsdk.

Comment thread NOnion/Utility/NetworkUtils.fs Outdated
Changed Retry function to take 1 type parameter instead of 2 as
handling 2 types of exceptions is not needed anymore because
SocketException is wrapped in NOnionException.
Added fsdk package. Reuse functions from Fsdk.
Renamed FSharpUtil module to AsyncUtil.
@webwarrior-ws webwarrior-ws changed the title Utility: made Retry func take 1 type parameter Utility: use Fsdk May 29, 2023
Use ExtractEmbeddedResourceFileContents function from Fsdk.
Remove local copy of that function.
@aarani aarani mentioned this pull request May 31, 2023
@knocte

knocte commented Oct 21, 2023

Copy link
Copy Markdown
Member

Thinking about it more, please revert your last commit that removes NOnion.Utility.FSharpUtil.WithTimeout, but I want FSharpUtil module be gone from NOnion to prevent naming clash with Fsdk, so let's rename it to NetworkUtils.fs? (To be consistent with other files in that folder.) BTW I had a look at other files in that folder and I think ResultUtils.fs's OperationResult overlaps with FSharpUtil's Either, let's remove it and use Either. And same thing for the Unwrap function, I think FSharpUtil has Unwrap func? If not, let's move it to Fsdk.

Was this done?

@webwarrior-ws

Copy link
Copy Markdown
Author

Thinking about it more, please revert your last commit that removes NOnion.Utility.FSharpUtil.WithTimeout, but I want FSharpUtil module be gone from NOnion to prevent naming clash with Fsdk, so let's rename it to NetworkUtils.fs? (To be consistent with other files in that folder.) BTW I had a look at other files in that folder and I think ResultUtils.fs's OperationResult overlaps with FSharpUtil's Either, let's remove it and use Either. And same thing for the Unwrap function, I think FSharpUtil has Unwrap func? If not, let's move it to Fsdk.

Was this done?

First part - yes, FSharpUtil is now called AsyncUtil.
OperationsResult is still there; it has different signature (1 type parameter instead of 2 in Fsdk.Either).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants