Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move TaskResult (and friends) to core FsToolkit.ErrorHandling package #175

Open
isaacabraham opened this issue Apr 14, 2022 · 9 comments
Open
Milestone

Comments

@isaacabraham
Copy link
Contributor

I think the core FsToolkit.ErrorHandling package should include the TaskResult CE etc. by default and use the FSharp.Core task { } block.

@TheAngryByrd
Copy link
Collaborator

I listed some hurdles in regards to this in: #142 (comment)

  • I was able to address the F# 6.0 concern by creating separate packages for netstandard2.0 and netstandard2.1.
  • I didn't want to deal with all the Fable concerns (unless they have shims for task now)

@TheAngryByrd TheAngryByrd changed the title Support for native task in taskResult Move TaskResult (and friends) to core FsToolkit.ErrorHandling package Apr 14, 2022
@TheAngryByrd
Copy link
Collaborator

TheAngryByrd commented Apr 14, 2022

use the FSharp.Core task { } block

If you mean by trying to recreate TaskResult in terms of task CE, unfortunately that isn't possible. taskResult (and friends) need their own Resumable Code to work correctly.

@TheAngryByrd
Copy link
Collaborator

I may revisit this for 4.0 but closing for now.

@TheAngryByrd TheAngryByrd closed this as not planned Won't fix, can't repro, duplicate, stale Oct 5, 2022
@TheAngryByrd
Copy link
Collaborator

for v5 of FsToolkit.ErrorHandling i'm removing Ply as a dependency and requiring F# 6 Core as a minimum. Because of that, I'm re-evaluating moving all the task code into the core package.

However I'm concerned with what the migration would look like. How will I be able to prevent someone from having v5 of FsToolkit.ErrorHandling and v4 of FsToolkit.ErrorHandling.TaskResult?

Trying to weight the options because no matter how loud you are in the release notes or social media, someones not gonna read the memo.

@TheAngryByrd TheAngryByrd reopened this Feb 4, 2024
@pblasucci
Copy link

pblasucci commented Feb 4, 2024

First off: I am in favor of setting .NET 6 as the minimum target runtime. 🎉

As for collapsing the libraries... I can´t think of a technical way to prevent weird dependency mish-mashes 🙁 But I still think it's a reasonable idea.

@TheAngryByrd
Copy link
Collaborator

I am in favor of setting .NET 6 as the minimum target runtime. 🎉

To clarify, that is not what I'm doing (I know this gets confusing). I'm setting the minimum to be F# Core 6 (when tasks were introduced) and still be on netstandard2.0/netstandard2.1. There isn't a compelling reason for this library to move to net6 unless someone really wants PoolingValueTask support.

@pblasucci
Copy link

Aaahhh... I see. That's actually more reasonable. 👍

@l3m
Copy link

l3m commented Feb 4, 2024

However I'm concerned with what the migration would look like. How will I be able to prevent someone from having v5 of FsToolkit.ErrorHandling and v4 of FsToolkit.ErrorHandling.TaskResult?

Trying to weight the options because no matter how loud you are in the release notes or social media, someones not gonna read the memo.

That true, unfortunately. Despite that, it seems like a good idea and I personally would prefer an integration of TaskResult into the main package.

@siwatanejo
Copy link

by default and use the FSharp.Core task { } block.

What's wrong with async{} blocks? They are actually more idiomatic F#.

@TheAngryByrd TheAngryByrd added this to the v5 milestone Feb 8, 2024
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

No branches or pull requests

5 participants