Skip to content

Conversation

@octopuscabbage
Copy link

Fixes issue #122

@octopuscabbage
Copy link
Author

I didn't write any additional tests for this because none of the functions seemed particularly testable.

@octopuscabbage
Copy link
Author

Forgot to add the dependencies, but they are there now. Adds one additional dependency 'network-uri'

@octopuscabbage
Copy link
Author

having a hell of a time satisfying the network uri dependency

@bergmark
Copy link
Member

Thanks for the pull request,

Unfortunately there are a number of issues i see with this approach:

  • Adding/modifying post-processing steps will require modifying rest-gen again
  • Introduces new dependencies, HTTP and network. These are pretty dated packages by now. Network is hard to install for windows users and we already use better http-client dependencies for rest (http-client).
  • Requires internet connectivity, doesn't allow to use a local version of closure

Extending what I wrote in #122 (comment) I'd rather we introduce a function generateJs :: JsConfig -> IO ByteString or similar, then you can easily use your approach without modifying rest-gen further.

@bergmark
Copy link
Member

Actually, this is already possible by calling mkJsApi directly instead of using generate. But It would be nice to be able to use the predefined flags anyway, I started working on this on the gen-modular branch.

@octopuscabbage
Copy link
Author

When are you planning to merge your gen modular branch? I could try moving some of the code over there and also adding in a command line compiler.

As for the dependencies, I can use http-client instead of HTTP I just thought you were already using network (because of yaml file for jenkins)

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

Successfully merging this pull request may close these issues.

2 participants