forked from google/proto-lens
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix google#185: Support and use autogen-modules.
This makes it possible to generate tarballs without generated modules (which would be regenerated anyway when the package is build). See tensorflow/haskell#180 for an example of the issues that causes. Unfortunately, this required us stopping using `hpack` in our packages that generate proto files. `hpack`, when you use the `autogen-modules` field, `cabal-version: >= 2.0` when the file I mitigated the situation a little by changing the Cabal test script to only try to `sdist` packages that we're planning to release.
- Loading branch information
Showing
13 changed files
with
298 additions
and
247 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,26 +17,8 @@ since they are intended only for use within this repository: | |
- Make sure you are on a commit that has been merged upstream to `google/proto-lens`. | ||
|
||
## Steps | ||
1. For each package *without* autogenerated proto modules, simply run (from the root of the repo): | ||
First, run `stack build` at the top level. Then, for each package that you want to upload, run | ||
|
||
stack upload {name-of-package} | ||
|
||
Then verify that they've been uploaded successfully by visiting `hackage.org` in a web browser. | ||
|
||
2. For packages *with* autogenerated proto-modules (currently: | ||
`proto-lens-protobuf-types` and `proto-lens-combinators`): these are a little | ||
harder to upload due to #185. We have a script for running `sdist`: | ||
|
||
./release.sh | ||
|
||
Then, for each package that should be uploaded: | ||
|
||
cabal upload {package}/dist/{path}.tar.gz | ||
|
||
3. Finally, tag each uploaded package with its version and push it back to upstream. For example: | ||
|
||
git tag -a proto-lens-v0.3.0.0 -m "Release proto-lens v0.3.0.0" | ||
... | ||
git remote add upstream [email protected]:google/proto-lens.git | ||
git push upstream --follow-tags # See: https://stackoverflow.com/a/26438076 | ||
|
||
Then verify that they've been uploaded successfully by visiting `hackage.org` in a web browser. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: proto-lens-combinators | ||
version: 0.1.0.10 | ||
synopsis: Utilities functions to proto-lens. | ||
description: Useful things for working with protos. | ||
category: Data | ||
homepage: https://github.com/google/proto-lens#readme | ||
bug-reports: https://github.com/google/proto-lens/issues | ||
author: Zie Weaver | ||
maintainer: [email protected] | ||
copyright: Google Inc. | ||
license: BSD3 | ||
license-file: LICENSE | ||
build-type: Custom | ||
cabal-version: >= 1.24 | ||
extra-source-files: | ||
Changelog.md | ||
tests/combinators.proto | ||
|
||
source-repository head | ||
type: git | ||
location: https://github.com/google/proto-lens | ||
subdir: proto-lens-combinators | ||
|
||
custom-setup | ||
setup-depends: | ||
Cabal | ||
, base >=4.8 && <4.12 | ||
, proto-lens-protoc ==0.3.* | ||
|
||
library | ||
exposed-modules: | ||
Data.ProtoLens.Combinators | ||
other-modules: | ||
Paths_proto_lens_combinators | ||
hs-source-dirs: | ||
src | ||
build-depends: | ||
base >=4.8 && <4.12 | ||
, data-default-class >=0.0 && <0.2 | ||
, lens-family ==1.2.* | ||
, proto-lens-protoc ==0.3.* | ||
, transformers >=0.4 && <0.6 | ||
default-language: Haskell2010 | ||
|
||
test-suite combinators_test | ||
type: exitcode-stdio-1.0 | ||
main-is: combinators_test.hs | ||
other-modules: | ||
Paths_proto_lens_combinators | ||
Proto.Combinators Proto.Combinators_Fields | ||
autogen-modules: | ||
Proto.Combinators Proto.Combinators_Fields | ||
hs-source-dirs: | ||
tests | ||
build-depends: | ||
HUnit | ||
, base | ||
, lens-family | ||
, lens-family-core | ||
, proto-lens | ||
, proto-lens-combinators | ||
, proto-lens-protoc | ||
, test-framework | ||
, test-framework-hunit | ||
default-language: Haskell2010 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: proto-lens-discrimination | ||
version: 0.1.1.0 | ||
synopsis: Support for using proto-lens types with http://hackage.haskell.org/package/discrimination. | ||
description: Reflection-based implementations of Sort for proto-lens' generated types. | ||
category: Data | ||
homepage: https://github.com/google/proto-lens#readme | ||
bug-reports: https://github.com/google/proto-lens/issues | ||
author: Andrew Pritchard | ||
maintainer: [email protected] | ||
copyright: Google Inc. | ||
license: BSD3 | ||
license-file: LICENSE | ||
build-type: Custom | ||
cabal-version: >= 1.24 | ||
extra-source-files: | ||
tests/enum.proto | ||
|
||
source-repository head | ||
type: git | ||
location: https://github.com/google/proto-lens | ||
subdir: proto-lens-discrimination | ||
|
||
custom-setup | ||
setup-depends: | ||
Cabal | ||
, base >=4.8 && <4.12 | ||
, proto-lens-protoc ==0.3.* | ||
|
||
library | ||
exposed-modules: | ||
Data.ProtoLens.Sort | ||
Data.ProtoLens.Group | ||
Data.ProtoLens.Discrimination | ||
other-modules: | ||
Paths_proto_lens_discrimination | ||
hs-source-dirs: | ||
src | ||
build-depends: | ||
base >=4.8 && <4.12 | ||
, bytestring ==0.10.* | ||
, containers >=0.5 && <0.6 | ||
, contravariant >=1.3 && <1.5 | ||
, data-default >=0.5 && <0.8 | ||
, discrimination >=0.3 && <0.4 | ||
, discrimination-ieee754 ==0.1.* | ||
, lens-family ==1.2.* | ||
, proto-lens >=0.3 && <0.4 | ||
, proto-lens-protoc >=0.3 && <0.4 | ||
, text ==1.2.* | ||
default-language: Haskell2010 | ||
|
||
test-suite discrimination_test | ||
type: exitcode-stdio-1.0 | ||
main-is: disc_test.hs | ||
other-modules: | ||
Proto.Enum | ||
Proto.Enum_Fields | ||
autogen-modules: | ||
Proto.Enum | ||
Proto.Enum_Fields | ||
hs-source-dirs: | ||
tests | ||
build-depends: | ||
HUnit >=1.3 && <1.7 | ||
, base >=4.8 && <4.12 | ||
, bytestring ==0.10.* | ||
, containers >=0.5 && <0.6 | ||
, contravariant >=1.3 && <1.5 | ||
, data-default >=0.5 && <0.8 | ||
, discrimination >=0.3 && <0.4 | ||
, discrimination-ieee754 ==0.1.* | ||
, lens-family ==1.2.* | ||
, proto-lens >=0.3 && <0.4 | ||
, proto-lens-arbitrary >=0.1 && <0.2 | ||
, proto-lens-discrimination | ||
, proto-lens-protoc >=0.3 && <0.4 | ||
, test-framework ==0.8.* | ||
, test-framework-hunit ==0.3.* | ||
, test-framework-quickcheck2 ==0.3.* | ||
, text ==1.2.* | ||
default-language: Haskell2010 |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.