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

Issue: example error parsing problem #280

Open
wants to merge 225 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
225 commits
Select commit Hold shift + click to select a range
620dc64
Parse Avro Schemas from JSON (#18)
Nov 18, 2019
a688b08
Implement unions for Avro and JSON (#20)
serras Nov 18, 2019
1baa38c
Initial implementation of Compendium client (#17)
serras Nov 18, 2019
bff6493
Separate packages (#21)
serras Nov 18, 2019
2cd0902
Depend on released packages
serras Nov 18, 2019
e0910af
Run stylish-haskell in all files! 💅🏼 (#23)
Nov 21, 2019
142a698
Add example todolist ✅ (#24)
Nov 25, 2019
7674ef0
Add API for exceptional error conditions (#25)
serras Nov 25, 2019
5a7b55f
Allow a wider range of types to stand for unions
serras Dec 2, 2019
152648a
Documentation refactor and improvements (#26)
serras Dec 3, 2019
7e699cd
Add Seed example 🌱 (#27)
Dec 4, 2019
1a96bcf
Separate annotations from core schema type 🖋 (#29)
serras Dec 4, 2019
80f6dcf
Add recommended vscode extensions! 💻 (#34)
Dec 5, 2019
427af36
Take metadata into account for GSchemaFieldTypeUnion (fixes #28) (#33)
serras Dec 5, 2019
c3c9c1d
Add support for logging and other transformers (#35)
serras Dec 5, 2019
701d334
Work on docs (#37)
serras Dec 10, 2019
a2116be
Implement Persistent example 💾 (#40)
Dec 13, 2019
61ae8be
Update dependencies (#42)
serras Dec 13, 2019
4e438ed
Do not run Haddock on CI (#43)
serras Dec 13, 2019
5072c01
Add persistent client to example 👨🏼‍💻 (#44)
Dec 16, 2019
cfd52d9
Higher-kinded data and To/FromSchema separation (#41)
serras Dec 16, 2019
09d7d65
Extract `mu-persistent` to it's own package! ✂️ (#47)
Dec 18, 2019
dfd3b59
Replace Travis with Github Actions and Nix ❄️ (#48)
Dec 19, 2019
a18b0c4
Make ghcide happy (#49)
serras Dec 19, 2019
6898d90
Document integration with Persistent 📚 (#50)
Dec 20, 2019
9dab396
Fallback to Travis 😔 (#54)
Dec 20, 2019
76df4fc
Docs initial website 🖨 (#53)
calvellido Dec 20, 2019
27479ab
Script to generate standalone Haddock documentation (#55)
serras Dec 20, 2019
a0fd84f
Update docs with Higher Kinded Data (#56)
Dec 20, 2019
a89a7ae
Update to v3 of cachix-action ❄️ (#51)
Dec 23, 2019
97a4e05
Add client with Record syntax to persistent example 👩🏼‍🎓 (#60)
Dec 26, 2019
aef5798
Add link to GitHub and API docs
serras Jan 6, 2020
7bce91d
Document gRPC client development! 📚 (#61)
Jan 7, 2020
b3c4b78
More thorough Haddock documentation (#65)
serras Jan 7, 2020
2d3484a
Merge branch 'master' into docs-header
Jan 7, 2020
08969e4
Slight update on styling
calvellido Jan 7, 2020
8a99c53
Merge pull request #64 from higherkindness/docs-header
calvellido Jan 7, 2020
8584007
Set Linuwial theme for Haddock generated docs (#66)
calvellido Jan 9, 2020
fb17ab1
Make Haddock style match docs style (#69)
serras Jan 9, 2020
dd06377
Update docs about gRPC clients (#68)
serras Jan 9, 2020
b8a303f
Add auto-deploy of microsite to GH Pages 🐙 (#67)
Jan 9, 2020
036236e
Website styling update (#70)
calvellido Jan 9, 2020
fbdcffd
Prepare for 0.1 (#71)
serras Jan 13, 2020
2b4bc60
Fill all cabal files for Hackage! 🚀 (#72)
Jan 13, 2020
65d2fb9
Fix intro docs and project file (#74)
serras Jan 13, 2020
65e93f2
Add some website additional meta information (#75)
calvellido Jan 13, 2020
ed98a20
Fix some typos in the docs (#76)
cb372 Jan 14, 2020
081e610
Various fixes to make gRPC server work (#84)
serras Jan 16, 2020
19e5c96
Allow newer versions of Stack (lts-14.20) 🆕 (#91)
Jan 23, 2020
c24a55d
Set new Mu visual identity for the website 💅 (#92)
calvellido Jan 24, 2020
0f5d898
Set decimal as list-style for ordered lists
calvellido Jan 27, 2020
733b24b
Merge pull request #94 from higherkindness/jv-93-ordered-lists
calvellido Jan 27, 2020
593949b
Add versioning to docs 📚 (#95)
Jan 27, 2020
3d5f25d
Update deploy.yml
calvellido Jan 27, 2020
e7a0401
Merge pull request #96 from higherkindness/calvellido-patch-1
calvellido Jan 27, 2020
088d9e1
Fix deploy: last tag and content (#97)
rachelcarmena Jan 27, 2020
6c633c9
Fix deploy: path (#98)
rachelcarmena Jan 27, 2020
a6a2f4b
Add dropdowns for different versions selection (#99)
calvellido Jan 27, 2020
14c185d
You can use `GITHUB_TOKEN` already provided by Github Actions (#100)
alejandrohdezma Jan 30, 2020
fd11ed6
Revert "You can use `GITHUB_TOKEN` already provided by Github Actions…
serras Feb 3, 2020
d7ba579
Optics for schema and gRPC clients (#102)
serras Feb 4, 2020
40c6a6c
Update Docker example (#103)
serras Feb 6, 2020
58240fc
Support for Avro as serialisation layer (#88)
serras Feb 6, 2020
8eb6bd8
Simple Kafka client (#104)
serras Feb 6, 2020
2c95654
Update dependencies (Stackage LTS 14.23, avro-0.4.6.0) (#105)
serras Feb 6, 2020
d00a812
Add Avro Seed example 🌱 (#108)
Feb 14, 2020
c5df797
Use newer Avro parser to support decimals (#109)
serras Feb 17, 2020
a513133
Update mu-haskell to use avro-parser-haskell-0.1.1 (#112)
Feb 26, 2020
1f0f98b
Release v0.2 (#113)
Feb 27, 2020
b71fd80
Better constructor for enumerations in optics (#115)
serras Feb 27, 2020
e759293
Add support for "date" and "time_ms" logical types in Avro (#114)
serras Feb 28, 2020
4da4da4
Make Mu.Avro depend on language-avro >= 0.1.2 (#116)
Feb 28, 2020
aef6ff8
Prefer Avro.Schema over Type (deprecated) (#117)
Feb 28, 2020
8c6e398
Upgrate to nix-action-v7 and cachix-action-v4 ❄️ (#118)
Feb 28, 2020
d6815e6
Fix logic for getting last tag (#119)
serras Mar 2, 2020
fd6025b
Install rdkafka as part of deployment (#120)
serras Mar 2, 2020
2009aee
New API to support GraphQL resolvers as services (#111)
serras Mar 5, 2020
584ca97
Don't use optics to access the single service for a gRPC service (#124)
serras Mar 5, 2020
efd4964
Add names to arguments (#126)
serras Mar 6, 2020
90779e3
Support operation names for documents (#127)
serras Mar 6, 2020
01ca136
Variables, directives, fragments (#128)
serras Mar 6, 2020
f9b1c9b
Support default values in GraphQL schemas (#129)
serras Mar 6, 2020
1c032a5
Remove higher-kinded data (#130)
serras Mar 9, 2020
0bc50ee
Update docs to remove reference to `w` parameter (#132)
serras Mar 10, 2020
cdcce16
Expose all GraphQL API as a WAI application (#131)
Mar 10, 2020
24771d6
First GraphQL app! (#133)
serras Mar 12, 2020
f6145d8
Better parser errors for GraphQL documents (#134)
serras Mar 12, 2020
834be31
Add GraphQL queries for all authors, books and find book by title 📚 (…
Mar 12, 2020
0340672
Parse queries returning schemas (#138)
serras Mar 12, 2020
d59bd13
Unify examples for Avro, Protobuf and GraphQL (#139)
serras Mar 13, 2020
141b783
Add Regex queries for authors and books 🕵🏼‍♂️ (#140)
Mar 13, 2020
819d863
Support GraphQL schemas w/o queries or mutations (#141)
serras Mar 16, 2020
cfa95fc
Fix missing deps and compile errors in stack templates (#144)
cb372 Mar 17, 2020
2a043db
Add CORS Headers to GraphQL Application 📵 (#147)
Mar 19, 2020
4bfbf8d
Pass variables when namedQuery is present! 🐛 (#149)
Mar 19, 2020
8234991
Support "__typename" meta-field (#150)
serras Mar 19, 2020
bfdf5f4
Subscriptions for GraphQL (#146)
serras Mar 20, 2020
c0db098
Update to warp-grpc 0.4 and fix multi-servers (#151)
serras Mar 23, 2020
d6195c6
Add Mu-GraphQL Readme! 📖 (#154)
Mar 23, 2020
137a04a
Add a CI job to test the Stack templates (#145)
cb372 Mar 24, 2020
68652e8
Fix the documentation for the initGRpc function (#156)
cb372 Mar 24, 2020
bb6007f
GraphQL introspection (#153)
serras Mar 25, 2020
c49a50c
Add Stack to Github Actions CI 🧪 (lts-15) (#155)
Mar 25, 2020
dae582b
Use LTS 14 to build standalone-haddock (#159)
serras Mar 25, 2020
0eb26e2
Cache Stack For Great Good 🏬 (#158)
Mar 25, 2020
e86dc0e
Update warp-grpc to 0.4.0.1 (#161)
serras Mar 26, 2020
9ce520c
Various fixes to GraphQL introspection (#160)
serras Mar 26, 2020
1580664
Fix documenation and error message for avdl parsing (#167)
cb372 Mar 31, 2020
f79477e
Use async instead of withAsync, fixes #165 (#168)
serras Mar 31, 2020
bcb480a
Support 'avro' 0.5 (#164)
serras Apr 1, 2020
b0f8486
Packed fields in Protocol Buffers (#170)
serras Apr 2, 2020
7e1c5ed
Missing gRPC instances (thanks @cb372) (#171)
serras Apr 2, 2020
336dd7e
Fix small bug while hashing *.hs files 🐛 (#172)
Apr 3, 2020
00a5484
Read GraphQL Schema Definitions (#166)
Apr 8, 2020
75c520d
Better API to declare servers (#173)
serras Apr 12, 2020
e41181a
Refactor out GraphQL example helpers! 🗜 (#177)
Apr 14, 2020
2789bbe
Docs for GraphQL + reorganization (#174)
serras Apr 15, 2020
4c9c2cd
Use new server API in examples and upgrade deps ⚗️ (#178)
Apr 15, 2020
0f559d7
Add documentation for `mu-optics` 📖 (#175)
Apr 16, 2020
e1fee12
Add Haddocks for 0.3 and fix problems with new Haddock (#179)
serras Apr 17, 2020
ee39f49
Upgrade templates to mu v0.3 🎸 (#181)
Apr 17, 2020
2f81736
Add new Stack template for GraphQL 🔥 (#182)
Apr 20, 2020
63d628e
Add latest version of warp-grpc v0.4.0.1 🕷 (#183)
Apr 20, 2020
ea87caf
Simplify API for Mu.GraphQL.Quasi.graphql ⛏ (#184)
Apr 22, 2020
b7e9392
Write small intro to GraphQL 🔥 (#185)
Apr 28, 2020
396d945
Docs for GraphQL subscriptions (#188)
serras Apr 28, 2020
f3d8737
Release v0.3 (#187)
Apr 28, 2020
a814917
Remove the Haddock hack to make it work on 0.2 and next (#189)
serras Apr 28, 2020
e4ec980
Various fixes for Avro encoding (#194)
serras May 26, 2020
981afe0
Annotations, information on RPC, and Prometheus (#198)
serras Jun 12, 2020
257894a
Update the `avdl` Template Haskell codegen (#199)
cb372 Jun 16, 2020
b24ec9a
Add needed kind signatures (#201)
serras Jun 18, 2020
de98924
Missing GraphQL instances + enum example (#204)
serras Jun 19, 2020
e5c7687
Add parameter to RpcInfo (#205)
serras Jun 22, 2020
f84344d
Nix Strikes Back ❄️ (#200)
Jun 26, 2020
5b087cc
Add boundaries to Cabal files 🚀 (#207)
Jul 3, 2020
2e60f4d
Be more explicit about Protobuf defaults in docs and code (#210)
serras Jul 20, 2020
09820af
Distributed tracing (#206)
serras Jul 20, 2020
dac53e0
Example using Persistent and GraphQL (#211)
serras Jul 27, 2020
10f299f
Add instrumentation to library example (#212)
serras Jul 28, 2020
a552470
Bump kramdown from 2.1.0 to 2.3.0 in /docs (#214)
dependabot[bot] Aug 10, 2020
c7cbe18
Revert "Bump kramdown from 2.1.0 to 2.3.0 in /docs (#214)"
Aug 27, 2020
202c3b7
Update instructions about dev environment (#220)
serras Sep 4, 2020
d8eb65d
Fix import of 'oneof' fields (#221)
serras Sep 4, 2020
a0baea5
Conversion to logical types (#223)
serras Sep 4, 2020
47390a1
Keep all annotations from .proto files (#222)
serras Sep 4, 2020
011fbba
Add video resources to readme! 📹 (#224)
Sep 10, 2020
7148ab3
📼 Add missing video of Haskell Symposium 2020! (#225)
Sep 17, 2020
28b59e2
Mu.Schema.Lens package (#227)
andremarianiello Sep 21, 2020
1f6f23f
Fix, add mu-lense package and update stack.yaml and nix (#228)
serras Sep 21, 2020
b612ef5
Servant support (#217)
andremarianiello Sep 25, 2020
5cea06f
Port health check to use Servant + fix a few corner cases (#229)
serras Sep 25, 2020
b97ce01
Simpler routes in Servant (#230)
serras Sep 28, 2020
9a69a7b
Expose Swagger definition + documentation (#231)
serras Oct 1, 2020
436dce6
Prepare release 0.4 (#233)
serras Oct 12, 2020
2fe3411
trigger GitHub deploy action
serras Oct 14, 2020
60f9a79
Videos in docs (#235)
serras Oct 15, 2020
f44f1f5
trigger GitHub deploy action
serras Oct 15, 2020
971bd59
Improve the Library example (with persistent) (#236)
vladimirlogachev Oct 20, 2020
fb196d7
Include avdl data files with mu-avro source dist (#238)
akshaymankar Oct 23, 2020
7839f32
Support bigger enums (#240)
akshaymankar Oct 30, 2020
5d9b01d
Use first-class-families to find selectors (#242)
serras Oct 30, 2020
678cd71
Add HLint to CI and fix templates (#243)
serras Nov 2, 2020
f14abfb
protobuf: Translate unsigned integers to corresponding Word types (#246)
akshaymankar Nov 9, 2020
15bf9a6
Use serverError instead of optional results (#248)
vladimirlogachev Nov 9, 2020
f61e898
Improve GraphQL example library 📚 (#249)
Nov 9, 2020
6090317
📦💥 Defend against possible explosion of decodeUtf8 (#250)
Nov 10, 2020
e4818ff
📚 📸 Add book images to graphql library example (#252)
Nov 12, 2020
ce9d9b9
Loosen bounds, update dependencies, support LTS-14 (#253)
serras Nov 12, 2020
bf5f605
Fix GraphQL subscriptions (#254)
serras Nov 12, 2020
8e0e846
Use a published GraphQL parser (#256)
serras Nov 12, 2020
73a1778
Fix GraphQL example + pools in mu-persistent (#261)
serras Nov 17, 2020
0a7441e
Protobuf nested types (#260)
akshaymankar Nov 17, 2020
0bcbe80
🏊🏻‍♂️ Remove pool of sql to prevent server timout (#263)
Nov 18, 2020
af2f569
Update several versions
serras Nov 19, 2020
6f274e6
Update Stack and Nix
serras Nov 19, 2020
6919178
Fix Nix version
serras Nov 19, 2020
28c162d
Final changes pre-release
serras Nov 19, 2020
4bfe6be
Fix deployment CI
serras Nov 19, 2020
6aa3338
Fix microsite creation
serras Nov 19, 2020
027d5b8
Try again to fix CI
serras Nov 19, 2020
b112c4f
Go back to old gh-pages action
serras Nov 19, 2020
b64e071
♻️ Run cabal-fmt and extract library example (#264)
Nov 20, 2020
e99149b
❄️ Add gitignore.nix to prevent Nix cache invalidation for trivial c…
Nov 20, 2020
071a1ab
Support nested types in GRpc methods (#266)
akshaymankar Nov 23, 2020
b800181
Update mu-protobuf version
serras Nov 23, 2020
e7ad63b
Fix CI (again)
serras Nov 23, 2020
aff0b44
Support GraphQL JSON scalar (#269)
serras Nov 30, 2020
a30a9e2
Maps in Protocol Buffers (#268)
serras Dec 1, 2020
ec1f85e
Use stylish-haskell from HLS (#271)
serras Dec 4, 2020
4cd6560
🎬 Cut down vscode extensions! (#272)
Dec 4, 2020
b763d4f
Unions in GraphQL (#270)
serras Jan 7, 2021
fcdb5d4
Fix TH generation for GraphQL input objects (#276)
serras Jan 8, 2021
7249dce
Provide an example highlighting grpc-client parsing problems as soon …
jschaul Jan 13, 2021
c13b435
Suggestion for contributing guide (#281)
jschaul Jan 15, 2021
8a013d1
Bump to LTS-17.0 (#284)
serras Jan 28, 2021
a5ce93a
Allow JSON inputs in GraphQL schemas 💮 (#283)
Jan 28, 2021
871b245
Release of [email protected]
Jan 28, 2021
1d5e3ee
Use and require default value 0 for enums in Protobuf (#285)
serras Jan 29, 2021
6674e68
Merge branch 'master' into example-grpc-client-error
Jan 29, 2021
83c667c
Update mu-schema version to 0.3.1.2 (#287)
serras Feb 2, 2021
8f3daec
Update mu.avro version
serras Feb 8, 2021
56b15ef
Fix segfault in GHC 8.8 (#290)
serras Feb 15, 2021
a43cd9b
Merge branch 'master' into example-grpc-client-error
Feb 26, 2021
e99ee0c
Parse inline fragments in GraphQL (#292)
serras Mar 11, 2021
a1570c9
Bump kramdown from 2.1.0 to 2.3.1 in /docs (#294)
dependabot[bot] Mar 30, 2021
24ac823
Update stack.yaml
serras Apr 1, 2021
e41ba78
Update Nix expression
serras Apr 1, 2021
0e4c5a2
Fix the sample args of gRpcCall in docs (#298)
y-taka-23 Apr 29, 2021
719e28e
Update deploy.yml (#299)
calvellido Apr 29, 2021
91f8df9
Try to fix deploy.yml (#303)
serras Apr 30, 2021
7e7f9a7
Try to fix deploy again (#304)
serras Apr 30, 2021
58d5ee9
New attempt at fixing deployment (#305)
serras Apr 30, 2021
b509cb5
Fix deploy, attempt 5 (#307)
serras Apr 30, 2021
fa23838
Add support for new primitive types in GraphQL (#295)
serras Apr 30, 2021
6c809a1
[protobuf] Fix parsing of oneof fields (#302)
serras Apr 30, 2021
7179ae5
Try fixing deploy again
serras Apr 30, 2021
1adc532
Do not create a loop in bidi gRPC (#306)
serras Apr 30, 2021
d3459db
Multiplex gRPC servers (#309)
serras May 10, 2021
6a5ae74
Support unions of more than 2 elements correctly (#308)
serras May 10, 2021
1c9f75a
[grpc-server] Close bidirectional streaming requests correctly (#312)
akshaymankar Jun 1, 2021
2018d12
[grpc-client] Handle bidirectional streams correctly (#314)
akshaymankar Jun 1, 2021
5a9aef6
Merge branch 'master' into example-grpc-client-error
Jun 1, 2021
4b5ee4d
Bump addressable from 2.7.0 to 2.8.0 in /docs (#319)
dependabot[bot] Jul 14, 2021
d9714e1
Merge branch 'master' into example-grpc-client-error
kutyel Aug 12, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
64 changes: 64 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Deploy
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: true
- name: Unshallow
run: git fetch --prune --unshallow
- uses: serras/setup-stack@v3
- uses: actions/[email protected]
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml') }}
restore-keys: |
${{ runner.os }}-stack-
- uses: actions/[email protected]
name: Cache .stack-work
with:
path: .stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ '**/*.hs' }}
restore-keys: |
${{ runner.os }}-stack-work-
- name: Get rdkafka
run: sudo apt-get install librdkafka-dev
- name: Get Ruby and Bundler
uses: ruby/setup-ruby@v1
with:
bundler: 2.1.2
ruby-version: 2.6
- name: Build microsite without Haddock
run: |
bundle config set path 'vendor/bundle'
bundle install --gemfile docs/Gemfile
BUNDLE_GEMFILE=./docs/Gemfile bundle exec jekyll build -b /mu-haskell -s docs -d gen-docs
- name: Get Standalone Haddock
run: stack --resolver lts-14.27 install standalone-haddock
- name: Build microsite from last release
run: |
LAST_TAG=$(git describe --abbrev=0 --tags)
git checkout $LAST_TAG
bash ./generate-haddock-docs.sh
bundle config set path 'vendor/bundle'
bundle install --gemfile docs/Gemfile
BUNDLE_GEMFILE=./docs/Gemfile bundle exec jekyll build -b /mu-haskell -s docs -d gen-docs
- name: Build microsite from master
run: |
git checkout master
bash ./generate-haddock-docs.sh
bundle config set path 'vendor/bundle'
bundle install --gemfile docs/Gemfile
BUNDLE_GEMFILE=./docs/Gemfile bundle exec jekyll build -b /mu-haskell/wip -s docs -d gen-docs/wip
- name: Deploy microsite
uses: peaceiris/actions-gh-pages@v2
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./gen-docs
22 changes: 22 additions & 0 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Haskell CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
submodules: true
- uses: cachix/install-nix-action@v12
- uses: cachix/cachix-action@v8
with:
name: 47deg
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix-build
- name: 'Set up HLint'
uses: rwe/[email protected]
- name: 'Run HLint'
uses: rwe/[email protected]
with:
path: '["core/schema/src/", "core/rpc/src/", "core/optics/src/", "core/lens/src/", "adapter/avro/src/", "adapter/protobuf/src/", "adapter/persistent/src/", "adapter/kafka/src/", "grpc/common/src/", "grpc/client/src/", "grpc/server/src/", "graphql/src/", "servant/server/src/", "instrumentation/prometheus/src/", "instrumentation/tracing/src/" ]'
fail-on: warning
21 changes: 18 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
stack*.yaml.lock
.*
.stack-work
*~
dist
*.pyc
dist*
*.pyc
.*sw?

## User files
.DS_Store

## Jekyll
_site
.sass-cache
.jekyll-metadata
.jekyll-cache

## Ruby environment normalization:
.bundle/
/docs/vendor/
docs/haddock
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "examples/library"]
path = examples/library
url = https://github.com/higherkindness/mu-graphql-example-elm.git
63 changes: 63 additions & 0 deletions .stylish-haskell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
steps:
- simple_align:
cases: true
top_level_patterns: true
records: true

# Import cleanup
- imports:
align: global
list_align: after_alias
pad_module_names: true
long_list_align: inline
empty_list_align: inherit
list_padding: 4
separate_lists: true
space_surround: false

# Language pragmas
- language_pragmas:
style: vertical
align: true
remove_redundant: true
language_prefix: language

# Remove trailing whitespace
- trailing_whitespace: {}

columns: 100
newline: native
cabal: true
language_extensions:
- BangPatterns
- ConstraintKinds
- DataKinds
- DefaultSignatures
- DeriveAnyClass
- DeriveDataTypeable
- DeriveGeneric
- DerivingStrategies
- DerivingVia
- ExplicitNamespaces
- FlexibleContexts
- FlexibleInstances
- FunctionalDependencies
- GADTs
- GeneralizedNewtypeDeriving
- InstanceSigs
- KindSignatures
- LambdaCase
- MultiParamTypeClasses
- MultiWayIf
- NamedFieldPuns
- NoImplicitPrelude
- OverloadedStrings
- QuasiQuotes
- RecordWildCards
- ScopedTypeVariables
- StandaloneDeriving
- TemplateHaskell
- TupleSections
- TypeApplications
- TypeFamilies
- ViewPatterns
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"haskell.haskell",
"EditorConfig.EditorConfig"
]
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"[haskell]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "haskell.haskell"
},
"haskell.formattingProvider": "stylish-haskell"
}
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @serras @kutyel
38 changes: 38 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Development recommendations

Most of our developers use using [Visual Studio Code](https://code.visualstudio.com/). In that case, you just have to open the project, and install the recommended extensions. Before continuing, make sure you've read:

- [Alejandro's post on setting up a Haskell development environment](https://www.47deg.com/blog/setting-up-haskell/), but forget about the Visual Studio Code configuration outlined there.
- [Kowainik's Haskell Style Guide](https://kowainik.github.io/posts/2019-02-06-style-guide).

## Setting up the project

### Native dependencies

The included `adapter/kafka` project requires development headers of the rdkafka library:
* on macOS `sudo brew install librdkafka`
* on fedora `sudo dnf install librdkafka-devel`
* on debian `sudo apt-get install librdkafka-dev`

### Git submodules

This project uses git submodules (notably for examples/library/). You can run `git submodule update --init --recursive` once after checkout, or `git config --global submodule.recurse true` to globally enable submodules.

### Integration tests

See also https://github.com/higherkindness/mu-scala-haskell-integration-tests

## Visual Studio Code extensions

To make our lives easier while developing in Haskell, we use a set of recommended extensions. The first time you open the project, the editor should suggest to install all those you do not have:

- [Haskell](https://marketplace.visualstudio.com/items?itemName=haskell.haskell), the best thing that happened to Haskell for editors/IDEs! ❤️
- [editorconfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig), to have consistency between different editors and envs 🐀

## Styling 💅🏼

We loosely follow [Kowainik's Haskell Style Guide](https://kowainik.github.io/posts/2019-02-06-style-guide). In order to automate styling, we use [stylish-haskell](https://github.com/jaspervdj/stylish-haskell), for which we provide a `.stylish-haskell.yaml` configuration file.

We don't provide any git hook or tool that enforces our style. By default the provided `.vscode/settings.json` file runs styling on every save. However, before you propose any PR please make sure to run `stylish-haskell` yourself, and to follow our style guide mentioned above to the extent possible. 😊

Happy hacking! 👏🏼
2 changes: 1 addition & 1 deletion rpc/LICENSE → LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright © 2019-2020 47 Degrees. <http://47deg.com>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
# Mu for Haskell

This repo defines a set of libraries which implement a similar functionality to [Mu for Scala](http://higherkindness.io/mu/), but in Haskell.
[![built with nix](https://builtwithnix.org/badge.svg)](https://builtwithnix.org)
[![Actions Status](https://github.com/higherkindness/mu-haskell/workflows/Haskell%20CI/badge.svg)](https://github.com/higherkindness/mu-haskell/actions)

* [`mu-schema`](https://github.com/higherkindness/mu-haskell/tree/master/schema) defines schemas for messages and conversion from and to Avro, Protocol Buffers, and JSON.
* [`mu-rpc`](https://github.com/higherkindness/mu-haskell/tree/master/rpc) defines schemas for service APIs, and the notion of a server for one such API.
* [`mu-grpc`](https://github.com/higherkindness/mu-haskell/tree/master/grpc) serves a `mu-rpc` server using gRPC.
This repo defines a set of libraries to write microservices in a format- and protocol-independent way. It shares the same goals as [Mu for Scala](http://higherkindness.io/mu/), but using idiomatic Haskell and more type-level techniques.

Each library contains a brief tutorial on how to use it. But if you want to see some examples, here they are:
## [Documentation](docs)

* [Haskell definition](https://github.com/higherkindness/mu-haskell/blob/master/schema/src/Mu/Schema/Examples.hs) of schemas corresponding to this [Avro](https://github.com/higherkindness/mu-haskell/blob/master/schema/test/avro/example.avsc) and [Protocol Buffers](https://github.com/higherkindness/mu-haskell/blob/master/schema/test/protobuf/example.proto) files.
* [Haskell definition and implementation](https://github.com/higherkindness/mu-haskell/blob/master/rpc/src/Mu/Rpc/Examples.hs) of a server corresponding to this [gRPC API](https://github.com/higherkindness/mu-haskell/blob/master/grpc/test/helloworld.proto).
## Contributing

## Building
This set of libraries are thought to be built using [Stack](https://docs.haskellstack.org). Just jump into the folder and run `stack build`! The top-level `stack.yaml` defines a common resolver and set of dependencies for all the packages.

This set of libraries are thought to be built using [Stack](https://docs.haskellstack.org). Just jump into the folder and run `stack build`! The top-level `stack.yaml` defines a common resolver and set of dependencies for all the packages.
If you want to contribute, please be sure to read the [development guidelines](DEVELOPMENT.md) first.
23 changes: 23 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Releasing a new version of Mu-Haskell

This list assumes you have your Hackage username and password set in your `.cabal/config` file.

1. Run `./test-schema.sh` and check that no errors are found
- If found, abort and open issue
2. Check that you can build with all compilers, and update project files if required:
- `stack build` (for the current LTS)
- `stack build --stack-yaml stack-nightly.yaml` (for the next version)
- `cabal build all`
3. For each package, run the following commands:

```
./release-package.sh <package> <version>
```

4. Push and merge any pending changes
5. Run `./test-templates.sh` and check that no errors are found
- If found, update templates in `templates` folder and open a PR
6. Publish a new release in GitHub:
- Tag by running `git tag -a vX.Y -m "Release X.Y"`
- Push the tag `git push --tags`
- Create a new release in [GitHub](https://github.com/higherkindness/mu-haskell/releases/new) for that tag, or if using [`hub`](https://hub.github.com/hub-release.1.html), run `hub release create vX.Y`
2 changes: 1 addition & 1 deletion grpc/LICENSE → adapter/avro/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright © 2019-2020 47 Degrees. <http://47deg.com>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
6 changes: 6 additions & 0 deletions adapter/avro/hie.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cradle:
stack:
- path: "./src"
component: "mu-avro:lib"
- path: "./test"
component: "mu-avro:exe:test-avro"
Loading