servant-multipart icon indicating copy to clipboard operation
servant-multipart copied to clipboard

GHCJS compilation

Open NCrashed opened this issue 3 years ago • 7 comments

If you try to compile the package with GHCJS (for instance, for generation of frontend from servant API), you will get:

error: no C compiler provided for this platform

NCrashed avatar Nov 13 '20 10:11 NCrashed

I have split package to api and backend part. https://github.com/hexresearch/servant-multipart/commit/92b6cb3458d51642e448862756d70d6df760e5b6

NCrashed avatar Nov 13 '20 11:11 NCrashed

Hi, i could use this, too. Would you mind opening a pull request in this repo in order to upstream it?

tfc avatar Mar 26 '21 13:03 tfc

@maksbotan @arianvp any way to get this in? i would also port the pull request to this repo if necessary.

tfc avatar Apr 28 '21 17:04 tfc

Indeed, if for some weird reason you guys use servant-multipart with GHCJS (why tho?), it should be splitted into servant-multipart-api, servant-multipart-client and servant-multipart (containing server code).

I would appreciate a draft PR that I can improve on. Basically, please make the current package a subdir of the repo and add two more packages, like servant itself does it.

maksbotan avatar Apr 28 '21 18:04 maksbotan

Indeed, if for some weird reason you guys use servant-multipart with GHCJS (why tho?), it should be splitted into servant-multipart-api, servant-multipart-client and servant-multipart (containing server code).

Does anything speak against doing that (i am eager to learn)? I look at this from a perspective where i have an API which simply contains file uploads and need to generate client code for it.

I would appreciate a draft PR that I can improve on. Basically, please make the current package a subdir of the repo and add two more packages, like servant itself does it.

Makes sense.

tfc avatar Apr 28 '21 18:04 tfc

Just a quick heads-up here,

There was some discussion about merging most sub-projects, including servant-multipart, into the main servant repository (see: https://github.com/haskell-servant/servant/issues/1404 ). The main reason is that the cookbooks induce a dependency loop between the various projects, and updates introduce frequent breakages.

Maybe is this a good opportunity to do so for this project ? CI is already setup for GHCJS there.

gdeest avatar Apr 29 '21 07:04 gdeest

For the record, I am :+1: for the split.

gdeest avatar Apr 29 '21 07:04 gdeest