Commit graph

174 commits

Author SHA1 Message Date
Ewout
9c6b3f63b6 Fix build on GHC 8.4 (#63)
* Fix haddock: postfix comments on GADT constructors don't work.

See https://github.com/haskell/haddock/issues/43 .

* Remove unused dependencies from cabal file..

* Semigroup instances for compatibility with GHC 8.4.
2018-06-18 12:24:19 -07:00
Gabriel Gonzalez
55f51eaa24
Build against latest proto3-suite (#56)
This reflects the latest changes in generating `ToSchema` instances
2018-04-20 13:37:12 -07:00
j6carey
3ee4dabc2d
Add a comment to ClientReaderRequest. (#55)
It was not obvious from the type how many times the
final field of ClientReaderRequest would be invoked.
(Assuming it is invoked once per stream increment
results in a hang, which can be confusing.)
2018-04-02 09:34:35 -07:00
Parnell Springmeyer
2cfca15c31
Fix the output of the nixpkgs derivation and make the pin forwards compatible with Nix 2.0 (#52)
* Fix the output of the nixpkgs derivation

* Use the fixed-output sha256 hash for builtins.fetchTarball

This change makes the nixpkgs pin forwards compatible with Nix 1.12.x
and Nix 2.0.

* Correct the phrasing of the code comment
2018-03-12 11:06:21 -05:00
Christian Lavoie
5fd44880da Remove proto3-wire dependency from core package. (#47) 2018-01-30 09:20:05 -08:00
Christian Lavoie
9cfb3da770 Extract lowlevel bits into a core package (#42) 2018-01-29 08:59:34 -08:00
Gabriel Gonzalez
1959939f50
Update to Nixpkgs 17.09 (#45)
This is a "shallow" update, meaning that there are still several dependencies
(such as `grpc` or Haskell packages) that are still pinned and those pins might
not be necessary any longer after this change.
2018-01-26 12:14:53 -08:00
gbaz
f0925d5b5f
Merge pull request #43 from awakesecurity/gb/use-latest-proto3-suite
update to latest proto3-suite
2018-01-17 12:17:51 -05:00
Gershom
351e8a8f75 update to latest proto3-suite 2018-01-17 12:16:38 -05:00
intractable
3fb4d88526
Tweak shebangs to run tests from nix-shell under NixOS (#41) 2017-12-28 10:04:44 -06:00
Remy Goldschmidt
4ef32ccf42 Use deterministic bootstrapping for nixpkgs (#40) 2017-12-28 09:41:39 -06:00
intractable
19125b42be
proto3-suite => 97c4f66 (#37)
* `proto3-suite` => `9394ade` and regenerate CG artifacts

* `proto3-suite` => `56cf36f`

* `proto3-wire` => `a938330`

* `proto3-suite` => `e8f2acb`

* Update `stack.yaml`

* Update CG artifacts for Echo and Arithmetic examples

* Update `stack.yaml`

* `proto3-suite` => `aff63e6` and add related nix deps

* Update CG artifacts for Echo and Arithmetic examples

* `proto3-suite` => `97c4f66`

* Nitpick: Rename test exe from `test` to `tests`

* Add `.gitattributes` files to mark generated modules
2017-11-02 15:36:57 -05:00
intractable
4a30625a70 Expose ClientError type (#36)
* Expose the max receive message length channel argument + unittest

* `ClientError` GADT ctor => `ClientErrorResponse`, expose `ClientError`

Prior to this commit, the name `ClientError` was both:
  - The name of a data constructor name for the `ClientResult` GADT
  - A name of an internal sum type for capturing different kinds of client
    errors

We want to expose the latter to users of the library, and so expose the latter
and rename the former.

* Remove unused `MultiWayIf` lang ext
2017-10-23 10:11:13 -05:00
intractable
3aa835a6f2 Expose GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH channel arg (#35)
* Expose the max receive message length channel argument + unittest

* Remove unused `MultiWayIf` ext
2017-10-20 16:39:26 -05:00
intractable
192bea70e8 Remove warnings from Arithmetic example (#34)
* Remove warnings from Arithmetic example

* Yes, Parnell, the binding isn't needed ;P
2017-10-20 15:53:47 -05:00
intractable
0ff7b36610 proto3-suite => 281a533 (#33)
* `proto3-suite` => `8bd72bb`

* `proto3-suite` => `5885153`

* Update `stack.yaml`

* `proto3-suite` => `281a533`

* Update `stack.yaml`
2017-09-09 11:32:52 -05:00
Olivier Nicole
679e3d7ded Make serverRequestCall interruptible (#30)
Instead of making a blocking foreign call without a timeout, we set a
timeout of one second. This way, the thread returns in Haskell code (and
thus is interruptible) at least every second. This is useful in order to
be able to kill `Server`s, see
https://github.com/awakesecurity/gRPC-haskell/issues/22.
2017-08-21 10:35:05 -05:00
Olivier Nicole
e0c567ec55 Make withServer provide the actual port (#29)
* Make withServer provide the actual port

Again, useful to make a server listen on any available port by giving it
port zero (for testing).

* Re-introduce check on server port

* Add port field to Server

* Style: Remove unneeded newline

* Revert changes in tests
2017-08-21 10:34:30 -05:00
intractable
ab8ec43d17 Updateproto3-suite, proto3-wire, and related deps (#31)
* Update turtle, optparse-{applicative,generic}; remove stack dep from nix-shell env

* Track proto3-suite changes to readDotProtoWithContext

* Update proto3-suite gitrev, use `compileDotProtoFileOrDie` in `GeneratedTests`

* Bump `proto3-suite` rev

* Bump `proto3-suite` and `proto3-wire` gitrevs, update `stack.yaml`
2017-08-19 09:16:10 -05:00
intractable
087ce6f49c Update self-signed SSL cert used by test suite (#28) 2017-08-06 03:06:53 -05:00
intractable
918e3a8d5a Derive Read instance for StatusCode (#27) 2017-08-05 23:46:12 -05:00
teh
d64c58efcf Typo fix (#26) 2017-08-05 10:06:53 -07:00
Connor Clark
a2d99ca178 latest lts resolver (#24) 2017-07-19 09:01:55 -07:00
intractable
fe55845d3f Update to latest proto3-suite, remove compile-proto-file exe (#23)
* Squash merge from branch `joel-fix-build-issues-and-broken-tests`

* Update `proto3-wire` and `proto3-suite` refs in `stack.yaml`

* Update `proto3-wire` and `proto3-suite` refs via `cabal2nix` for `nix` builds

* Remove `compile-proto-file` from the repo, as it is now available via `proto3-suite`

* Update `proto3-suite` ref in `stack.yaml`

* Update `proto3-suite` ref via `cabal2nix` for `nix` builds

* Update `proto3-suite` and `proto3-wire` gitrevs

* Regenerate Echo and Arithmetic example modules from their respective .protos

* Fix typo
2017-07-17 20:42:35 -05:00
Gabriel Gonzalez
7d2e797ad5 Merge pull request #20 from awakenetworks/gabriel/no_clang
Update `release.nix` instructions.  Fixes #19
2017-06-14 07:06:40 -07:00
Gabriel Gonzalez
8207f6ecf6 Remove --with-gcc=clang from README.md, too 2017-06-14 07:06:14 -07:00
Gabriel Gonzalez
92c0653809 Update release.nix instructions. Fixes #19
We no longer require the `--with-gcc=clang` flag and it can cause
failed builds such as the one described in #19.  I tested that the
`cabal` workflow works on OS X and NixOS without this flag
2017-06-13 21:36:14 -07:00
intractable
d95052ebe6 Update nix-shell env and update tasty-quickcheck dep (#18)
* Add tasty-quickcheck to library deps

* Add shell hook to no-tests target and export it at toplevel

* cabal2nix . > default.nix

* PR feedback from @parnell (better shell hooks)
2017-05-30 11:45:22 -05:00
Parnell Springmeyer
865b175845 Merge pull request #16 from awakenetworks/parnell/fix-hydra-failure
serverPort => clientServerPort
2017-04-30 18:36:25 -05:00
Parnell Springmeyer
82000dadd4
serverPort => clientServerPort 2017-04-30 18:01:45 -05:00
Connor Clark
169dbb7fff First draft of a tutorial (#15)
* add basic tutorial, re-export client stuff in HighLevel.Generated

* add a relative link in README.md

* forgot to document the language extensions

* cabal file fixup

* more context to compile-proto-file

* haskell syntax highlighting in markdown

* link to gRPC official tutorials for basic concepts

* add a note on how to build the examples

* prominent notice of required gRPC version

* fix typo

* do some error handling, show how to run the example executables

* use mapM
2017-04-30 15:38:29 -07:00
Connor Clark
b550607f60 gRPC 1.2.0 compatibility (#12)
* update for reorganized headers in gRPC v1.1: https://github.com/grpc/grpc/pull/7559

* update nix files

* rename all gpr_slice to grpc_slice since we can't be backwards compatible anyway

* use gRPC 1.1.4

* now compatible with gRPC 1.2.0

* use nixpkgs 17.03 to get protobuf3_2, newer proto3-* deps, fix some warnings

* another warning
2017-04-14 19:28:01 -07:00
intractable
4ab231c1d9 Update proto3-suite ref to 8db2ceb8c48a3f8dc2cbdc492d1e8cbaf8b62a15 (#10)
* Update `proto3-suite` gitrev in `stack.yaml` to `8db2ceb8c48a3f8dc2cbdc492d1e8cbaf8b62a15`

* Update `proto3-suite` gitrev in `nix/proto3-suite.nix` to `8db2ceb8c48a3f8dc2cbdc492d1e8cbaf8b62a15`

* Regenerate `Echo.hs` via new `proto3-suite` + `compile-proto-file`

* Remove additional warnings
2017-03-17 07:48:41 -05:00
intractable
5caae587e5 Remove a bunch of compilation warnings. (#9)
* Remove a bunch of compilation warnings

* Fix typo in `cabal configure` invocation
2017-03-16 12:42:51 -05:00
intractable
081be2af78 Pin nixpkgs and drop use of fetchgitPrivate for proto3-suite. (#8)
* Pin nixpkgs to `7ae9da426924537755ce9164fd5b5f81ce16a1c3`; minor documentation tweaks

* Remove use of `fetchgitPrivate` from `proto3-suite` toplevel pkg override attr def
2017-03-15 18:02:26 -05:00
intractable
584ae318a9 Merge pull request #6 from awakenetworks/joel-fix-python-client-test-hang
Fix hang in Python test client
2017-03-10 15:58:11 -06:00
Joel Stanley
cdad0fcd3d
Fix python test client to send done message on exception paths 2017-03-10 15:05:32 -06:00
Gabriel Gonzalez
1009a2aceb Merge pull request #2 from awakenetworks/gabriel/update_homepage
Update homepage field of `.cabal` file
2017-03-06 11:08:29 -08:00
Gabriel Gonzalez
54a735eeab Update homepage field of .cabal file 2017-03-06 11:06:17 -08:00
Gabriel Gonzalez
92367fb97f Merge pull request #1 from awakenetworks/gabriel/update_contact
Update contact information
2017-03-01 07:51:23 -08:00
Gabriel Gonzalez
d94598129f Update contact information 2017-02-28 16:29:04 -08:00
Gabriel Gonzalez
e25a512b14 Prominently attribute the original work this was based on (#94)
This work began as a fork of https://github.com/aloiscochard/grpc-haskell so we
should mention that prominently when we open source this project
2017-02-28 13:42:14 -08:00
Joel Stanley
052901e070 Change protobuf-wire => proto3-suite in stack.yaml (#93) 2017-02-27 18:26:13 -08:00
Gabriel Gonzalez
bff8fb7c7e Switch from protobuf-wire to proto3-suite (#92)
`protobuf-wire` was open sourced as `proto3-suite` (with a corresponding module
rename) so this change updates the dependency and import lists
2017-02-27 08:43:37 -08:00
Gabriel Gonzalez
6888394dfa Add instructions on how to install and run compile-proto-file (#91)
You can use `nix-env` to install any derivation that outputs binaries underneath
a `bin/` directory, so we can reuse `nix-env` for installing binaries built by
this project.
2017-02-14 15:39:58 -08:00
Gabriel Gonzalez
8732a669c0 Fix compile-proto-file on OS X (#90)
Before this change, `compile-proto-file` fails due to a missing `grpc` library.
After this change `compile-proto-file` runs successfully on OS X
2017-02-14 15:39:43 -08:00
Joel Stanley
9a3be32ed7 Update echo client/server to use CG and high-level interfaces (#88)
* echo client/server example: dead code removal, add command line params, improve output messages

* Add nix-build result to .gitignore

* Merge echo-client and echo-server directories to echo-hs/ directory; rename main modules accordingly

* Use our protobuf compiler to generate bindings for the Echo service

* Simplify echo.proto to just one endpoint; use highlevel client/server interfaces and codegen for echo example

* Remove repetition counts and thread spawns from echo client, parameterize payload

* Update default.nix
2016-12-22 14:33:44 -06:00
Joel Stanley
db3d66c4eb Add compile-proto-file helper cli tool (#87)
* Add compile-proto-file helper cli tool (.proto -> ast -> .hs)

* Update default.nix
2016-12-21 11:47:05 -06:00
Joel Stanley
24681a619b Upgrade nix grpc version to 1.0.1 + fix tests (#86)
* Use GRPC v1.01 (grpc-1.0.1-6040b47)

* Minor tweaks to GRPC request result processing (less exact matching on some StatusDetails due to GRPC rev bump)
2016-12-20 15:57:38 -06:00
Joel Stanley
89a5547dc0 Add script for circumventing MacOS SIP and using nix-built grpc; upda… (#85)
* Add script for circumventing MacOS SIP and using nix-built grpc; update README.md

* Guard destructive /usr/local and brew updates with a user prompt
2016-12-20 11:37:46 -06:00