Skip to content

Conversation

@abelbraaksma
Copy link
Member

@abelbraaksma abelbraaksma commented Oct 28, 2023

Problem statement

The library FsToolkit.ErrorHandling.TaskResult is an excellent library, but recently they have introduced non backwards-compatible dependencies that limit our ability to continue using this library in our tests for obvious reasons: we want the tests to be as close to real-world as possible, using the lowest denominator FSharp.Core that the TaskSeq library supports.

  • The 4.x range, including the very first 4.0.0 requires FSharp.Core 7.x: https://www.nuget.org/packages/FsToolkit.ErrorHandling/
  • Versions 3.3.1-beta001-3.3.1 require FSharp.Core 7.0.0 or up
  • Version 3.2.0 (the one we have been using, but it is getting rather old) requires FSharp.Core 6.0.3

Since TaskSeq is backward compatible till FSharp.Core 6.0.1, we should try to test it with that version.

Simple solution

The simplest way is to move the dependent tests to SmokeTests (which is only the PoC, ironically showing the problems with lists of Tasks using an oversight of the TaskResult library, where it seems to support lists of Tasks, but not really if they're hot-started, and they always are).

Note that SmokeTests does the opposite, and tests the library, using a a pull of the actual NuGet lib, against recent versions of FSharp.Core.

…skResult dependency

We want to remove the dependency in our tests on FsToolkit.ErrorHandling in PR #181 because it uses a high version of FSharp.Core. In other words, it disallows us to properly test TaskSeq with the lowest-denominator FSharp.Core it was compiled with, which we should do,  to ensure stability in the widest range of forward-and-backward compatibility. The SmokeTests library, on the other hand, uses the highest RTM release of FSharp.Core and we don't really care about other deps there.
…er used `TaskResult` in these files anyway

We want to remove the dependency in our tests on FsToolkit.ErrorHandling.TaskResult in PR #181 because it uses a high version of FSharp.Core. In other words, it disallows us to properly test TaskSeq with the lowest-denominator FSharp.Core it was compiled with, which we should do, to ensure stability in the widest range of forward-and-backward compatibility. The SmokeTests library, on the other hand, uses the highest RTM release of FSharp.Core and we don't really care about other deps there.
…rom the `TaskSeq.Test` project

We want to remove the dependency in our tests on FsToolkit.ErrorHandling.TaskResult in PR #181 because it uses a high version of FSharp.Core. In other words, it disallows us to properly test TaskSeq with the lowest-denominator FSharp.Core it was compiled with, which we should do, to ensure stability in the widest range of forward-and-backward compatibility. The SmokeTests library, on the other hand, uses the highest RTM release of FSharp.Core and we don't really care about other deps there.
…: 6.0.1: achieve best backward compat testing

We want to remove the dependency in our tests on FsToolkit.ErrorHandling.TaskResult in PR #181 because it uses a high version of FSharp.Core. In other words, it disallows us to properly test TaskSeq with the lowest-denominator FSharp.Core it was compiled with, which we should do, to ensure stability in the widest range of forward-and-backward compatibility. The SmokeTests library, on the other hand, uses the highest RTM release of FSharp.Core and we don't really care about other deps there.
@abelbraaksma abelbraaksma force-pushed the remove-fstoolkit-taskresult-from-tests branch from cee3082 to 32c57b3 Compare October 29, 2023 16:14
@abelbraaksma
Copy link
Member Author

Thanks for review @bartelink!! 👍

I've updated the code based on your suggestions and will merge to main. If you want, you can re-review :).

@abelbraaksma abelbraaksma self-assigned this Oct 29, 2023
@abelbraaksma abelbraaksma added dependencies Pull requests that update a dependency file compatibility Related to backward or forwards, or F# Core or .NET version compatibility topic: unit-tests Related to, or fixing unit tests refactoring Cleanup, refactoring and minor fixes labels Oct 29, 2023
@abelbraaksma
Copy link
Member Author

abelbraaksma commented Oct 29, 2023

@bartelink it looks like you don't have write access, so your review is not unblocking (but I can unblock myself, of course). Maybe I should give you write access?

@abelbraaksma abelbraaksma merged commit e2d79cf into main Oct 29, 2023
@abelbraaksma abelbraaksma deleted the remove-fstoolkit-taskresult-from-tests branch October 29, 2023 17:52
abelbraaksma added a commit that referenced this pull request Oct 29, 2023
…skResult dependency

We want to remove the dependency in our tests on FsToolkit.ErrorHandling in PR #181 because it uses a high version of FSharp.Core. In other words, it disallows us to properly test TaskSeq with the lowest-denominator FSharp.Core it was compiled with, which we should do,  to ensure stability in the widest range of forward-and-backward compatibility. The SmokeTests library, on the other hand, uses the highest RTM release of FSharp.Core and we don't really care about other deps there.
abelbraaksma added a commit that referenced this pull request Oct 29, 2023
…er used `TaskResult` in these files anyway

We want to remove the dependency in our tests on FsToolkit.ErrorHandling.TaskResult in PR #181 because it uses a high version of FSharp.Core. In other words, it disallows us to properly test TaskSeq with the lowest-denominator FSharp.Core it was compiled with, which we should do, to ensure stability in the widest range of forward-and-backward compatibility. The SmokeTests library, on the other hand, uses the highest RTM release of FSharp.Core and we don't really care about other deps there.
abelbraaksma added a commit that referenced this pull request Oct 29, 2023
…rom the `TaskSeq.Test` project

We want to remove the dependency in our tests on FsToolkit.ErrorHandling.TaskResult in PR #181 because it uses a high version of FSharp.Core. In other words, it disallows us to properly test TaskSeq with the lowest-denominator FSharp.Core it was compiled with, which we should do, to ensure stability in the widest range of forward-and-backward compatibility. The SmokeTests library, on the other hand, uses the highest RTM release of FSharp.Core and we don't really care about other deps there.
abelbraaksma added a commit that referenced this pull request Oct 29, 2023
…: 6.0.1: achieve best backward compat testing

We want to remove the dependency in our tests on FsToolkit.ErrorHandling.TaskResult in PR #181 because it uses a high version of FSharp.Core. In other words, it disallows us to properly test TaskSeq with the lowest-denominator FSharp.Core it was compiled with, which we should do, to ensure stability in the widest range of forward-and-backward compatibility. The SmokeTests library, on the other hand, uses the highest RTM release of FSharp.Core and we don't really care about other deps there.
@bartelink
Copy link
Member

(but I can unblock myself, of course).

Apologies; please put me on the drive by commenters list ;)
Your standards/judgement for what makes sense to merge are in excess of mine, and any comments can always be addressed in follow-ups

@abelbraaksma
Copy link
Member Author

@bartelink I've given you Triage access, which, I think, allows you to basically do everything, accept for write access (that is, the final merge will have to be approved or done by me). I value your input, thanks! 👍

@abelbraaksma abelbraaksma added this to the v0.4.0 milestone Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compatibility Related to backward or forwards, or F# Core or .NET version compatibility dependencies Pull requests that update a dependency file refactoring Cleanup, refactoring and minor fixes topic: unit-tests Related to, or fixing unit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants