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

Worried about the Diamond dependency problem #187

Open
TheAngryByrd opened this issue Oct 20, 2022 · 6 comments
Open

Worried about the Diamond dependency problem #187

TheAngryByrd opened this issue Oct 20, 2022 · 6 comments

Comments

@TheAngryByrd
Copy link
Collaborator

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.

image

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.

@abelbraaksma
Copy link

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'.

@TheAngryByrd
Copy link
Collaborator Author

Possibly? Might need more context. Could also be missing the DLL in the directory of where ever you are running.

@abelbraaksma
Copy link

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.

@abelbraaksma
Copy link

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.

@abelbraaksma
Copy link

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".

@AntyaDev
Copy link

AntyaDev commented Dec 3, 2022

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: true
But it doesn't help.

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

3 participants