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

Fable.Remoting.Giraffe broken in Giraffe 5 #201

Closed
kerams opened this issue Dec 8, 2020 · 4 comments
Closed

Fable.Remoting.Giraffe broken in Giraffe 5 #201

kerams opened this issue Dec 8, 2020 · 4 comments

Comments

@kerams
Copy link
Collaborator

kerams commented Dec 8, 2020

So Giraffe 5 has switched away from TaskBuilder to Ply. Fable.Remoting.Giraffe implicitly depends on TaskBuilder through Giraffe, so if the user doesn't manually reference TaskBuilder, all method invocations fail with System.IO.FileNotFoundException: Could not load file or assembly 'TaskBuilder.fs, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.

It's probably a good idea to at least constrain Fable.Remoting.Giraffe's dependency on Giraffe to >= 3.6.0 && < 5.0.0. We could also upgrade to Giraffe 5, but it only supports net50, so that'd make Fable.Remoting.Giraffe unusable on netcoreapp3.1, which is an LTS. In other words, using Giraffe 5 with Remoting means consumers need to depend on both TaskBuilder and Ply (they are not massive libraries by any means but still).

I feel we're in a pickle here.

@Zaid-Ajaj
Copy link
Owner

Hi @kerams, this is indeed a bit annoying but we can manage. Here is my proposition to maintain backward-compat which is easiest to implement (even though I don't like it that much):

Duplicate the code of Fable.Remoting.Giraffe into another package (in directory Fable.Remoting.GiraffeNET5) that removes TaskBuilder, uses latest Giraffe and targets net5

Keep the Fable.Remoting.Giraffe package its current state but publish a new version that constraints Giraffe dependency to >= 3.6 && > 5.0

What do you think?

@kerams
Copy link
Collaborator Author

kerams commented Dec 9, 2020

Check out #202. It uses Async as the intermediary (Tasks from Giraffe are converted to Async and the whole Async is converted back to Task). This is ever so slightly slower than a task builder, but is a decent compromise, because it works with Giraffe 3 to 5 and depends neither on TaskBuilder nor on Ply.

@Zaid-Ajaj
Copy link
Owner

Awesome! @kerams ❤️ I merged it in and published two Fable.Remoting.Giraffe packages

  • v4.14 that depends on latest stable Giraffe v4.1
  • v5.0.0-rc-6 for net5 that depends on latest Giraffe v5.0.0-rc-6 (will keep them in sync)

The latter doesn't have a tests project but uses the same source code of v4.14 so iT sHoulD bE fInE, right? right?! 😄

Give the prerelease version a try if you have a test project and let know if any changes needed

@kerams
Copy link
Collaborator Author

kerams commented Dec 10, 2020

Yup, all good on my end, thanks.

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

2 participants