FsToolkit.ErrorHandling
FsToolkit.ErrorHandling copied to clipboard
Worried about the Diamond dependency problem
Is your feature request related to a problem? Please describe.
I'm worried about diamond dependencies with this project. As it grows more popular, more things will start relying on it and start causing conflicts with consumers.
For example, seeing packages constraining the upper limit can possibly slow adoption.
Describe the solution you'd like
Since this is just a pile of functions without much in the way of dependencies usually, it might want to explore this Source package approach.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.
I'm currently struggling with the following error, might that be caused by exactly what you're describing here?
System.TypeLoadException : Could not load type 'TaskResultBuilder' from assembly 'FsToolkit.ErrorHandling.TaskResult, Version=3.2.0.0, Culture=neutral, PublicKeyToken=null'.
Possibly? Might need more context. Could also be missing the DLL in the directory of where ever you are running.
Well, I’m still investigating. It happens with dotnet test. Failed after updating from 2.x. It first complained about Pky not being there, which was implicit and not a problem before, so I added it manually. Then it gave the above error.
However, same solution on one system succeeds, in CI it succeeds, but not on mine, not on one other. All systems had the Ply error, but only some have the above. Even after cleaning/clearing caches etc. Still investigating. Will let you know, but may be hard to make a small repo.
Oh, also surprising, some functions that do use TaskResult, succeed. Some others fail.
It may be a dependency that itself uses F# task, and somehow this conflicts. But still, why it’s differently behaving per system is weird.
Meanwhile sorted it out. The problem was caused by some functions using helpers from our own Nuget package store that in turn used a 2.x FsToolkit. Upgrading that package to use the newer FsToolkit solved the issue.
My guess is that a conflict arose with these functions defaulting to Ply tasks, which ultimately caused a runtime error. Why it wasn't caught as a compile time error, I don't know.
I tried to create a minimal repro, but each time I dumbed it down, it "just worked".
I got the same issue: System.TypeLoadException: Could not load type 'TaskResultBuilder' from assembly 'FsToolkit.ErrorHandling.TaskResult, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null'
After updating from the 2.3.1 version, I see this runtime error. It happens only in build Debug (I don't see it in the Release). Also I tried to add: <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies> But it doesn't help.