diff --git a/RELEASE.md b/RELEASE.md index 2f68647..697fc63 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,16 +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. Run `./test-templates.sh` and check that no errors are found +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 + ``` + +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 -3. Publish a new release in GitHub: +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` -5. For each package, run the following commands: - - create the package: `cabal sdist package` - - publish a candidate: `cabal upload route-to.tar.gz`, and check it - - publish definitely: `cabal upload --publish route-to.tar.gz` - - create the docs: `cabal v2-haddock --builddir="dist-newstyle" --haddock-for-hackage --enable-doc package` - - publish docs: `cabal upload -d --publish route-to-docs.tar.gz` diff --git a/adapter/avro/mu-avro.cabal b/adapter/avro/mu-avro.cabal index 0adef6c..109a960 100644 --- a/adapter/avro/mu-avro.cabal +++ b/adapter/avro/mu-avro.cabal @@ -57,7 +57,7 @@ executable test-avro avro >=0.5.1 && <0.6 , base >=4.12 && <5 , bytestring >=0.10 && <0.11 - , mu-avro ==0.4.* + , mu-avro , mu-schema ==0.3.* hs-source-dirs: test diff --git a/adapter/protobuf/mu-protobuf.cabal b/adapter/protobuf/mu-protobuf.cabal index 212b73f..17cb5f7 100644 --- a/adapter/protobuf/mu-protobuf.cabal +++ b/adapter/protobuf/mu-protobuf.cabal @@ -40,7 +40,7 @@ library , mu-rpc ==0.4.* , mu-schema ==0.3.* , proto3-wire >=1.1 && < 2 - , servant-client-core >=0.16 && <0.17 + , servant-client-core >=0.16 && <0.19 , sop-core >=0.5 && <0.6 , template-haskell >=2.14 && <2.16 , text >=1.2 && <2 @@ -54,7 +54,7 @@ executable test-protobuf build-depends: base >=4.12 && <5 , bytestring - , mu-protobuf >=0.3.0 + , mu-protobuf , mu-schema >=0.3.0 , proto3-wire , text diff --git a/cabal.project b/cabal.project index ae48089..1ed668a 100644 --- a/cabal.project +++ b/cabal.project @@ -1,4 +1,6 @@ -allow-newer: http2, http2-client, template-haskell, proto3-wire +allow-newer: base, network, foldl, http2, http2-client, template-haskell, proto3-wire, servant, swagger2, optics, optics-core + +preferences: base16-bytestring < 1 packages: compendium-client/ core/schema/ @@ -27,3 +29,8 @@ source-repository-package type: git location: https://github.com/hasura/graphql-parser-hs.git tag: f4a093981ca5626982a17c2bfaad047cc0834a81 + +source-repository-package + type: git + location: https://github.com/haskell/c2hs.git + tag: 20d3c8dedde83af91c4ac06486bf346316e07285 diff --git a/compendium-client/compendium-client.cabal b/compendium-client/compendium-client.cabal index 3e59349..c11f0ad 100644 --- a/compendium-client/compendium-client.cabal +++ b/compendium-client/compendium-client.cabal @@ -1,5 +1,5 @@ name: compendium-client -version: 0.2.0.0 +version: 0.2.1.0 synopsis: Client for the Compendium schema server description: Client for the schema server @@ -27,8 +27,8 @@ library , http-client >=0.6.4 && <0.7 , language-protobuf >=1.0.1 && <1.1 , megaparsec >=8 && <9 - , servant >=0.16 && <0.17 - , servant-client >=0.16 && <0.17 + , servant >=0.16 && <0.19 + , servant-client >=0.16 && <0.19 , text >=1.2 && <2 hs-source-dirs: src diff --git a/core/lens/mu-lens.cabal b/core/lens/mu-lens.cabal index 38980f7..8d1e163 100644 --- a/core/lens/mu-lens.cabal +++ b/core/lens/mu-lens.cabal @@ -22,7 +22,7 @@ source-repository head library exposed-modules: Mu.Schema.Lens build-depends: - base + base >=4.12 && <5 , containers , lens , generic-lens diff --git a/core/schema/src/Mu/Schema/Interpretation/Schemaless.hs b/core/schema/src/Mu/Schema/Interpretation/Schemaless.hs index 9b23333..cfc62d7 100644 --- a/core/schema/src/Mu/Schema/Interpretation/Schemaless.hs +++ b/core/schema/src/Mu/Schema/Interpretation/Schemaless.hs @@ -81,7 +81,7 @@ data FieldValue where -- Use this function to check a schemaless terms -- at the "borders" of your application. checkSchema - :: forall (s :: Schema tn fn) (t :: tn). + :: forall tn fn (s :: Schema tn fn) (t :: tn). (CheckSchema s (s :/: t)) => Proxy t -> Term -> Maybe (S.Term s (s :/: t)) checkSchema _ = checkSchema' diff --git a/default.nix b/default.nix index 9f6ca1f..43ffb5b 100644 --- a/default.nix +++ b/default.nix @@ -1,5 +1,5 @@ let - haskellNix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/2a15520.tar.gz) {}; + haskellNix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/53ed0a9.tar.gz) {}; nixpkgsSrc = haskellNix.sources.nixpkgs-2003; nixpkgsArgs = haskellNix.nixpkgsArgs; in diff --git a/graphql/mu-graphql.cabal b/graphql/mu-graphql.cabal index 46d6089..63c0e55 100644 --- a/graphql/mu-graphql.cabal +++ b/graphql/mu-graphql.cabal @@ -35,6 +35,7 @@ library , base >=4.12 && <5 , bytestring >=0.10 && <0.11 , conduit >=1.3.2 && <2 + , foldl >=1.4 && <2 , graphql-parser , http-types >=0.12 && <0.13 , list-t >=1.0 && <2 @@ -70,7 +71,7 @@ executable library-graphql build-depends: base >=4.12 && <5 , conduit >=1.3.2 && <1.4 - , mu-graphql ==0.4.* + , mu-graphql , mu-rpc ==0.4.* , mu-schema ==0.3.* , regex-tdfa >=1.3 && <2 diff --git a/release-package.sh b/release-package.sh new file mode 100755 index 0000000..d08ea47 --- /dev/null +++ b/release-package.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +cabal sdist ${1} +cabal upload dist-newstyle/sdist/${1}-${2}.tar.gz +echo "Check that it has been published correctly, and press Enter" +read +cabal upload --publish dist-newstyle/sdist/${1}-${2}.tar.gz +cabal v2-haddock --builddir="dist-newstyle" --haddock-for-hackage --enable-doc ${1} +cabal upload -d --publish dist-newstyle/${1}-${2}-docs.tar.gz diff --git a/servant/server/mu-servant-server.cabal b/servant/server/mu-servant-server.cabal index 9f0814c..21633f3 100644 --- a/servant/server/mu-servant-server.cabal +++ b/servant/server/mu-servant-server.cabal @@ -23,21 +23,21 @@ source-repository head library exposed-modules: Mu.Servant.Server build-depends: - aeson >=1.4 && <2 - , async - , base - , conduit - , generic-aeson - , ghc-prim - , mtl - , mu-rpc - , mu-schema - , servant - , servant-server - , servant-swagger - , stm - , swagger2 - , utf8-string + aeson >=1.4 && <2 + , async >=2.2 && < 3 + , base >=4.12 && <5 + , conduit >=1.3.2 && <2 + , generic-aeson >=0.2 && <0.3 + , ghc-prim >=0.5 && <0.7 + , mtl >=2.2 && <3 + , mu-rpc ==0.4.* + , mu-schema ==0.3.* + , servant >=0.16 && <0.19 + , servant-server >=0.16 && <0.19 + , servant-swagger >=1.1.7 && <2 + , stm >=2.5 && <3 + , swagger2 >=2.5 && <3 + , utf8-string >=1 && <2 hs-source-dirs: src default-language: Haskell2010 @@ -46,15 +46,15 @@ library executable servant-example-server main-is: ExampleServer.hs build-depends: - aeson - , base - , conduit - , mu-rpc - , mu-schema + aeson >=1.4 && <2 + , base >=4.12 && <5 + , conduit >=1.3.2 && <2 + , mu-rpc ==0.4.* + , mu-schema ==0.3.* , mu-servant-server - , servant-server - , text - , warp + , servant-server >=0.16 && <0.19 + , text >=1.2 && <2 + , warp >=3.3 && <4 hs-source-dirs: exe default-language: Haskell2010 diff --git a/stack-14.yaml b/stack-14.yaml deleted file mode 100644 index 07effca..0000000 --- a/stack-14.yaml +++ /dev/null @@ -1,57 +0,0 @@ -resolver: lts-14.27 -allow-newer: true - -packages: -- core/schema -- core/rpc -- core/optics -- core/lens -- adapter/avro -- adapter/protobuf -- adapter/persistent -- adapter/kafka -- grpc/common -- grpc/client -- grpc/server -- graphql -- servant/server -- instrumentation/prometheus -- instrumentation/tracing -- examples/health-check -- examples/library -- examples/route-guide -- examples/seed -- examples/todolist -- examples/with-persistent -- compendium-client - -extra-deps: -- http2-client-0.9.0.0 -- http2-client-grpc-0.8.0.0 -- http2-grpc-proto3-wire-0.1.0.0 -- http2-grpc-types-0.5.0.0 -- proto3-wire-1.1.0 -- warp-grpc-0.4.0.1 -- hw-kafka-client-3.1.1 -- hw-kafka-conduit-2.7.0 -- tracing-control-0.0.6 -- wai-middleware-prometheus-1.0.0 -- git: https://github.com/hasura/graphql-parser-hs.git - commit: f4a093981ca5626982a17c2bfaad047cc0834a81 -# missing in LTS 14.x -- AC-Angle-1.0 -- avro-0.5.2.0 -- conduit-1.3.2 -- HasBigDecimal-0.1.1 -- indexed-profunctors-0.1 -- language-protobuf-1.0.1 -- language-avro-0.1.3.1 -- optics-core-0.2 -- primitive-0.7.0.0 -- primitive-extras-0.8 -- primitive-unlifted-0.1.3.0 -- regex-base-0.94.0.0 -- regex-tdfa-1.3.1.0 -- stm-hamt-1.2.0.4 -- stm-containers-1.1.0.4 -- stm-lifted-2.5.0.0 diff --git a/stack-nightly.yaml b/stack-nightly.yaml index 3b51ce9..1ef4fe9 100644 --- a/stack-nightly.yaml +++ b/stack-nightly.yaml @@ -30,7 +30,7 @@ extra-deps: - http2-client-grpc-0.8.0.0 - http2-grpc-proto3-wire-0.1.0.0 - http2-grpc-types-0.5.0.0 -- proto3-wire-1.1.0 +- proto3-wire-1.2.0 - warp-grpc-0.4.0.1 - hw-kafka-client-3.1.1 - hw-kafka-conduit-2.7.0 @@ -38,6 +38,8 @@ extra-deps: - wai-middleware-prometheus-1.0.0 - git: https://github.com/hasura/graphql-parser-hs.git commit: f4a093981ca5626982a17c2bfaad047cc0834a81 +- generic-aeson-0.2.0.10 +- parameterized-0.5.0.0 # Dropped in LTS 16 - primitive-extras-0.8 - primitive-unlifted-0.1.3.0 @@ -45,5 +47,10 @@ extra-deps: - stm-containers-1.1.0.4 - stm-lifted-2.5.0.0 # Dropped in last nightly -- servant-client-0.16 -- servant-client-core-0.16 +- servant-blaze-0.9 +- servant-client-core-0.18 +- servant-client-0.18 +- servant-server-0.18 +- servant-swagger-1.1.10 +- servant-swagger-ui-core-0.3.3 +- servant-swagger-ui-0.3.4.3.23.11 diff --git a/stack.yaml b/stack.yaml index 9ec92c3..ec3e3b7 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,4 +1,4 @@ -resolver: lts-16.15 +resolver: lts-16.18 allow-newer: true packages: @@ -30,7 +30,7 @@ extra-deps: - http2-client-grpc-0.8.0.0 - http2-grpc-proto3-wire-0.1.0.0 - http2-grpc-types-0.5.0.0 -- proto3-wire-1.1.0 +- proto3-wire-1.2.0 - warp-grpc-0.4.0.1 - hw-kafka-client-3.1.1 - hw-kafka-conduit-2.7.0 @@ -39,9 +39,16 @@ extra-deps: - git: https://github.com/hasura/graphql-parser-hs.git commit: f4a093981ca5626982a17c2bfaad047cc0834a81 - generic-aeson-0.2.0.10 +- parameterized-0.5.0.0 # Dropped in LTS 16 - primitive-extras-0.8 - primitive-unlifted-0.1.3.0 - stm-hamt-1.2.0.4 - stm-containers-1.1.0.4 - stm-lifted-2.5.0.0 +# Updated servant +- servant-0.18 +- servant-client-core-0.18 +- servant-client-0.18 +- servant-server-0.18 +- servant-swagger-1.1.10 diff --git a/templates/graphql-server.hsfiles b/templates/graphql-server.hsfiles index 658744d..2c7d80c 100644 --- a/templates/graphql-server.hsfiles +++ b/templates/graphql-server.hsfiles @@ -20,23 +20,23 @@ executable {{name}} build-depends: base >=4.12 && <5 , conduit - , mu-graphql >=0.3.0 - , mu-rpc >=0.3.0 - , mu-schema >=0.3.0 + , mu-graphql >=0.4.0 + , mu-rpc >=0.4.0 + , mu-schema >=0.3.1 , text , wai-extra , warp {-# START_FILE stack.yaml #-} -resolver: lts-15.8 +resolver: lts-16.18 allow-newer: true extra-deps: -- mu-schema-0.3.0.0 -- mu-rpc-0.3.0.0 -- mu-graphql-0.3.0.0 +- mu-schema-0.3.1.0 +- mu-rpc-0.3.4.0 +- mu-graphql-0.4.0.0 - git: https://github.com/hasura/graphql-parser-hs.git - commit: 1380495a7b3269b70a7ab3081d745a5f54171a9c + commit: f4a093981ca5626982a17c2bfaad047cc0834a81 {-# START_FILE Setup.hs #-} import Distribution.Simple diff --git a/templates/grpc-server-avro.hsfiles b/templates/grpc-server-avro.hsfiles index 119924a..54afc4b 100644 --- a/templates/grpc-server-avro.hsfiles +++ b/templates/grpc-server-avro.hsfiles @@ -20,34 +20,32 @@ executable {{name}} default-language: Haskell2010 build-depends: base >=4.12 && <5 - , mu-avro >=0.3.0 - , mu-grpc-server >=0.3.0 - , mu-rpc >=0.3.0 - , mu-schema >=0.3.0 + , mu-avro >=0.4.0 + , mu-grpc-server >=0.4.0 + , mu-rpc >=0.4.0 + , mu-schema >=0.3.1 , text {-# START_FILE stack.yaml #-} -resolver: lts-15.8 +resolver: lts-16.18 allow-newer: true extra-deps: # mu -- mu-schema-0.3.0.0 -- mu-rpc-0.3.0.0 +- mu-schema-0.3.1.0 +- mu-rpc-0.4.0.0 - mu-optics-0.3.0.0 -- mu-avro-0.3.0.0 -- mu-protobuf-0.3.0.0 -- mu-grpc-server-0.3.0.0 -- mu-grpc-common-0.3.0.0 +- mu-avro-0.4.0.0 +- mu-protobuf-0.4.0.0 +- mu-grpc-server-0.4.0.0 +- mu-grpc-common-0.4.0.0 - compendium-client-0.2.0.0 # dependencies of mu - http2-client-0.9.0.0 - http2-grpc-types-0.5.0.0 - http2-grpc-proto3-wire-0.1.0.0 - warp-grpc-0.4.0.1 -- proto3-wire-1.1.0 -- language-protobuf-1.0.1 -- language-avro-0.1.3.1 -- avro-0.5.1.0 +- proto3-wire-1.2.0 +- parameterized-0.5.0.0 {-# START_FILE Setup.hs #-} import Distribution.Simple diff --git a/templates/grpc-server-protobuf.hsfiles b/templates/grpc-server-protobuf.hsfiles index 8df9296..2c8bbc9 100644 --- a/templates/grpc-server-protobuf.hsfiles +++ b/templates/grpc-server-protobuf.hsfiles @@ -20,10 +20,10 @@ executable {{name}} default-language: Haskell2010 build-depends: base >=4.12 && <5 - , mu-grpc-server >=0.3.0 - , mu-protobuf >=0.3.0 - , mu-rpc >=0.3.0 - , mu-schema >=0.3.0 + , mu-grpc-server >=0.4.0 + , mu-protobuf >=0.4.0 + , mu-rpc >=0.4.0 + , mu-schema >=0.3.1 , text {-# START_FILE stack.yaml #-} @@ -31,23 +31,21 @@ resolver: lts-15.8 allow-newer: true extra-deps: # mu -- mu-schema-0.3.0.0 -- mu-rpc-0.3.0.0 +- mu-schema-0.3.1.0 +- mu-rpc-0.4.0.0 - mu-optics-0.3.0.0 -- mu-avro-0.3.0.0 -- mu-protobuf-0.3.0.0 -- mu-grpc-server-0.3.0.0 -- mu-grpc-common-0.3.0.0 +- mu-avro-0.4.0.0 +- mu-protobuf-0.4.0.0 +- mu-grpc-server-0.4.0.0 +- mu-grpc-common-0.4.0.0 - compendium-client-0.2.0.0 # dependencies of mu - http2-client-0.9.0.0 - http2-grpc-types-0.5.0.0 - http2-grpc-proto3-wire-0.1.0.0 - warp-grpc-0.4.0.1 -- proto3-wire-1.1.0 -- language-protobuf-1.0.1 -- language-avro-0.1.3.1 -- avro-0.5.1.0 +- proto3-wire-1.2.0 +- parameterized-0.5.0.0 {-# START_FILE Setup.hs #-} import Distribution.Simple