Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
Fix thingies
Browse files Browse the repository at this point in the history
  • Loading branch information
serras committed Jan 7, 2023
1 parent 920cbdc commit 63e278d
Show file tree
Hide file tree
Showing 20 changed files with 76 additions and 384 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3.3.0
with:
submodules: true
- name: Unshallow
run: git fetch --prune --unshallow
- uses: serras/setup-stack@v3
- uses: actions/cache@v2.1.3
- uses: actions/cache@v3.2.2
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-stack-${{ hashFiles('stack.yaml') }}
restore-keys: |
${{ runner.os }}-stack-
- uses: actions/cache@v2.1.3
- uses: actions/cache@v3.2.2
name: Cache .stack-work
with:
path: .stack-work
Expand Down Expand Up @@ -57,8 +57,8 @@ jobs:
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
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_branch: gh-pages
publish_dir: ./gen-docs
8 changes: 4 additions & 4 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
- uses: actions/checkout@v3.3.0
with:
submodules: true
- uses: cachix/install-nix-action@v17
- uses: cachix/cachix-action@v10
- uses: cachix/install-nix-action@v18
- uses: cachix/cachix-action@v11
with:
name: 47deg
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: nix-build
- name: 'Set up HLint'
uses: rwe/[email protected].2
uses: rwe/[email protected].3
- name: 'Run HLint'
uses: rwe/[email protected]
with:
Expand Down
8 changes: 4 additions & 4 deletions adapter/avro/mu-avro.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ library
Mu.Quasi.Avro.Example

build-depends:
aeson >=1.4 && <2
aeson >=1.4 && <2.1
, avro >=0.5.1 && <0.7
, base >=4.12 && <5
, bytestring >=0.10 && <0.11
, bytestring >=0.10 && <0.12
, containers >=0.6 && <0.7
, deepseq >=1.4 && <2
, language-avro >=0.1.3 && <0.2
, mu-rpc >=0.4 && <0.6
, mu-schema >=0.3 && <0.4
, sop-core >=0.5.0 && <0.6
, tagged >=0.8.6 && <0.9
, template-haskell >=2.14 && <2.18
, template-haskell >=2.14 && <2.19
, text >=1.2 && <2
, time >=1.9 && <2
, transformers >=0.5 && <0.6
Expand All @@ -59,7 +59,7 @@ executable test-avro
build-depends:
avro >=0.5.1 && <0.7
, base >=4.12 && <5
, bytestring >=0.10 && <0.11
, bytestring >=0.10 && <0.12
, containers >=0.6 && <0.7
, mu-avro
, mu-schema >=0.3 && <0.4
Expand Down
2 changes: 1 addition & 1 deletion adapter/kafka/mu-kafka.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ library
build-depends:
avro >=0.5.1 && <0.7
, base >=4.12 && <5
, bytestring >=0.10 && <0.11
, bytestring >=0.10 && <0.12
, conduit >=1.3.2 && <2
, hw-kafka-client >=3 && <5
, hw-kafka-conduit >=2.7 && <3
Expand Down
7 changes: 3 additions & 4 deletions adapter/protobuf/mu-protobuf.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: mu-protobuf
version: 0.4.2.0
version: 0.4.3.0
synopsis:
Protocol Buffers serialization and gRPC schema import for Mu microservices

Expand Down Expand Up @@ -32,8 +32,7 @@ library

build-depends:
base >=4.12 && <5
, bytestring >=0.10 && <0.11
, compendium-client >=0.2 && <0.3
, bytestring >=0.10 && <0.12
, containers >=0.6 && <0.7
, http-client >=0.6 && <0.8
, http2-grpc-proto3-wire >=0.1 && <0.2
Expand All @@ -43,7 +42,7 @@ library
, proto3-wire >=1.1 && <2
, servant-client-core >=0.16 && <0.20
, sop-core >=0.5 && <0.6
, template-haskell >=2.14 && <2.18
, template-haskell >=2.14 && <2.19
, text >=1.2 && <2

hs-source-dirs: src
Expand Down
20 changes: 1 addition & 19 deletions adapter/protobuf/src/Mu/Quasi/GRpc.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
Description : Quasi-quoters for gRPC files
Read @.proto@ files as a 'Mu.Schema.Definition.Schema'
and a set of 'Service's. The origin of those @.proto@
files can be local (if using 'grpc') or come
from a Compendium Registry (if using 'compendium').
and a set of 'Service's.
-}
module Mu.Quasi.GRpc (
grpc
, compendium
) where

import Control.Monad.IO.Class
Expand All @@ -24,7 +21,6 @@ import qualified Language.ProtocolBuffers.Types as P
import Network.HTTP.Client
import Servant.Client.Core.BaseUrl

import Compendium.Client
import Mu.Quasi.ProtoBuf
import Mu.Rpc

Expand All @@ -43,20 +39,6 @@ grpc schemaName servicePrefix fp
Right p
-> grpcToDecls schemaName servicePrefix p

-- | Obtains a schema and service definition from Compendium,
-- and generates the declarations from 'grpc'.
compendium :: String -> (String -> String)
-> String -> String -> Q [Dec]
compendium schemaTypeName servicePrefix baseUrl identifier
= do m <- liftIO $ newManager defaultManagerSettings
u <- liftIO $ parseBaseUrl baseUrl
r <- liftIO $ obtainProtoBuf m u (T.pack identifier)
case r of
Left e
-> fail ("could not parse protocol buffers spec: " ++ show e)
Right p
-> grpcToDecls schemaTypeName servicePrefix p

grpcToDecls :: String -> (String -> String) -> P.ProtoBuf -> Q [Dec]
grpcToDecls schemaName servicePrefix p@P.ProtoBuf { P.package = pkg, P.services = srvs }
= do let schemaName' = mkName schemaName
Expand Down
202 changes: 0 additions & 202 deletions compendium-client/LICENSE

This file was deleted.

Loading

0 comments on commit 63e278d

Please sign in to comment.